Unofficial YouTube Music / Spotify Premium client for Android, built in Liquid Glass. Audio effects, Spotify Connect, listening history, 8 languages. Rust core on librespot.
Kotlin alternativeandroidandroid-applicationclientglassmorphisminnertubelibrespotliquid-glassspotifyspotify-connectspotifyapiyoutube-musicyoutube-playerytdlnis
Fall back to the Web API when rootlist is down
Lelonioe8fab91bb94e
diff --git a/.claude/settings.local.json b/.claude/settings.local.jsonindex 34f9685..fbd3725 100644--- a/.claude/settings.local.json+++ b/.claude/settings.local.json@@ -135,7 +135,8 @@"Bash(git commit -q -m 'Use the supplied icon artwork *)","Bash(python3 tools/icon.py)","Bash(git commit -q -m 'Regenerate icons from source, sized by the wave *)",- "Bash(git commit -q -m 'New light icon artwork *)"+ "Bash(git commit -q -m 'New light icon artwork *)",+ "Bash(git commit -q -m 'Fall back to the Web API when rootlist is down *)"]}}diff --git a/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin b/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.binindex 1624394..c7eacc3 100644--- a/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin+++ b/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin@@ -2,27 +2,27 @@ C/C++ Structured Logljh/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/additional_project_files.txtCA-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint �����3 ����3i+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint �����3 ����3ig-e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build.json �����3� ����3n+e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build.json �����3� ����3nl-j/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build_mini.json �����3� �����3[+j/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build_mini.json �����3� �����3[Y-W/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja �����3�� ����3_+W/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja �����3�� ����3_]-[/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja.txt �����3d+[/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja.txt �����3db-`/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build_file_index.txt �����3 @ ����3e+`/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build_file_index.txt �����3 @ ����3ec-a/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json �����3�� ����3i+a/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json �����3�� ����3ig-e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json.bin �����3 �" ����3o+e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json.bin �����3 �" ����3om-k/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/metadata_generation_command.txt �����3+k/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/metadata_generation_command.txt �����3� ����3b`-^/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/prefab_config.json �����3 ( ����3g+^/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/prefab_config.json �����3 ( ����3ge-c/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/symbol_folder_index.txt �����3 b ����3D+c/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/symbol_folder_index.txt �����3 b ����3DB-@/Users/emanuele/Progetto Spotify/app/src/main/cpp/CMakeLists.txt �����3 � �Ȅ��3\ No newline at end of file+@/Users/emanuele/Progetto Spotify/app/src/main/cpp/CMakeLists.txt �����3 � �Ȅ��3\ No newline at end of filediff --git a/app/src/main/java/dev/emanuele/spot/ui/MainViewModel.kt b/app/src/main/java/dev/emanuele/spot/ui/MainViewModel.ktindex 488da76..123b39d 100644--- a/app/src/main/java/dev/emanuele/spot/ui/MainViewModel.kt+++ b/app/src/main/java/dev/emanuele/spot/ui/MainViewModel.kt@@ -555,7 +555,7 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {}_state.value = UiState.Loading- runCatching { UiState.Ready(Catalog.username(), Catalog.playlists()) }+ runCatching { UiState.Ready(Catalog.username(), playlists()) }.onSuccess {_state.value = itloadProfile()@@ -573,6 +573,31 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {* already on screen with the account name by the time this runs, and an* account with no Web API application connected simply keeps it.*/+ /**+ * The account's playlists, from the access point or from the Web API.+ *+ * The access point is asked first: it is the same list, it needs no+ * registered application, and it carries the playlists this account follows+ * as well as its own. But `rootlist` answers 502 often enough to matter —+ * a Spotify-side failure nothing here can prevent — and losing the whole+ * library screen to it is out of proportion, since the Web API can answer+ * the same question.+ */+ private suspend fun playlists(): List<CatalogPlaylist> =+ runCatching { Catalog.playlists() }+ .onFailure { android.util.Log.w(TAG, "rootlist unavailable: ${describe(it)}") }+ .recoverCatching {+ check(container.webApi.isReady) { it.message ?: "rootlist non disponibile" }+ container.api.playlists(limit = WEB_API_PAGE).items.map { dto ->+ CatalogPlaylist(+ uri = dto.uri,+ name = dto.name,+ artworkUrl = dto.images.firstOrNull()?.url,+ )+ }+ }+ .getOrThrow()+private fun loadProfile() = viewModelScope.launch {if (!container.webApi.isReady) return@launchrunCatching { container.api.me() }