Skip to content

Commit

Permalink
Deleted Spotify mods downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbyESP committed Dec 29, 2023
1 parent 7474420 commit 7700e0b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
15 changes: 0 additions & 15 deletions app/src/main/java/com/bobbyesp/spowlo/ui/pages/InitialEntry.kt
Original file line number Diff line number Diff line change
Expand Up @@ -523,21 +523,6 @@ fun InitialEntry(
}
}

LaunchedEffect(true) {
Log.d(TAG, "InitialEntry: Checking for mod updates")
if (PreferencesUtil.isNetworkAvailable()) {
val apiResult = ModsDownloaderAPIService.create().getAPIResponse()
if (apiResult.isSuccess) {
val apiResponse = apiResult.getOrNull()
if (apiResponse != null) {
modsDownloaderViewModel.updateApiResponse(apiResponse)
}
} else {
ToastUtil.makeToast(context.getString(R.string.api_call_failed))
}
}
}

// LaunchedEffect(Unit) {
// if (SPOTDL.getString().isNotEmpty()) return@LaunchedEffect
// kotlin.runCatching {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.ContentAlpha
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.TextButton
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.FormatListBulleted
import androidx.compose.material.icons.filled.LibraryMusic
Expand Down Expand Up @@ -85,6 +86,7 @@ import com.bobbyesp.spowlo.ui.common.LocalWindowWidthState
import com.bobbyesp.spowlo.ui.components.ClearButton
import com.bobbyesp.spowlo.ui.components.ConsoleOutputComponent
import com.bobbyesp.spowlo.ui.components.NavigationBarSpacer
import com.bobbyesp.spowlo.ui.components.SpowloDialog
import com.bobbyesp.spowlo.ui.components.songs.SongCard
import com.bobbyesp.spowlo.ui.dialogs.DownloaderSettingsDialog
import com.bobbyesp.spowlo.ui.pages.settings.about.LocalAsset
Expand Down Expand Up @@ -134,6 +136,8 @@ fun DownloaderPage(

val useDialog = LocalWindowWidthState.current != WindowWidthSizeClass.Compact

val (showModsBannedDialog, updateShowModsBannedDialog) = remember { mutableStateOf(false) }

val clipboardManager = LocalClipboardManager.current
val keyboardController = LocalSoftwareKeyboardController.current

Expand Down Expand Up @@ -181,7 +185,9 @@ fun DownloaderPage(
keyboardController?.hide()
},
navigateToDownloads = navigateToDownloads,
navigateToMods = navigateToMods,
navigateToMods = {
updateShowModsBannedDialog(!showModsBannedDialog)
},
onSongCardClicked = { onSongCardClicked() },
showOutput = showConsoleOutput,
showSongCard = true,
Expand All @@ -207,6 +213,24 @@ fun DownloaderPage(
hide = { downloaderViewModel.hideDialog(scope, useDialog) })
}
}

if(showModsBannedDialog) {
SpowloDialog(
title = {
Text(text = stringResource(id = R.string.mods_downloader))
},
text = {
Text(text = stringResource(id = R.string.mods_downloader_banned))
},
onDismissRequest = { updateShowModsBannedDialog(false) },
confirmButton = {
TextButton(onClick = { updateShowModsBannedDialog(false) }) {
Text(text = stringResource(id = R.string.agree))
}
}
)
}

}

@OptIn(
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -341,4 +341,5 @@
<string name="split_playlist_desc">Make the downloader split your downloads folder into folders with the name of the playlist</string>
<string name="split_by_main_artist">Split by main artist</string>
<string name="split_by_main_artist_desc">The downloader splits you downloads depending on the main artist of the song</string>
<string name="mods_downloader_banned">The mods downloader has been deleted since Firebase (a Google hosting service) has disabled APKs downloading in the free version of the same. Please, consider using xManager as an alternative.</string>
</resources>

0 comments on commit 7700e0b

Please sign in to comment.