chore: fix genres & personalized content not loading

This commit is contained in:
Kingkor Roy Tirtho 2023-09-28 15:27:13 +06:00
parent 94c386638f
commit 5a758d8671
4 changed files with 6 additions and 3 deletions

View File

@ -142,6 +142,7 @@ class SpotubeAudioPlayer extends AudioPlayerInterface
String? get currentSource {
// if (mkSupportedPlatform) {
if (_mkPlayer.playlist.index == -1) return null;
return _mkPlayer.playlist.medias
.elementAtOrNull(_mkPlayer.playlist.index)
?.uri;

View File

@ -58,8 +58,8 @@ class CustomSpotifyEndpoints {
'include_external': includeExternal,
'timestamp': DateTime.now().toUtc().toIso8601String(),
if (locale != null) 'locale': locale,
if (market != null) 'market': market,
if (country != null) 'country': country,
if (market != null) 'market': market.name,
if (country != null) 'country': country.name,
}.entries.map((e) => '${e.key}=${e.value}').join('&');
final res = await _client.get(

View File

@ -53,7 +53,7 @@ class CategoryQueries {
(pageParam, spotify) async {
final playlists = await Pages<PlaylistSimple?>(
spotify,
"v1/browse/categories/$category/playlists?country=$market&locale=$locale",
"v1/browse/categories/$category/playlists?country=${market.name}&locale=$locale",
(json) => json == null ? null : PlaylistSimple.fromJson(json),
'playlists',
(json) => PlaylistsFeatured.fromJson(json),

View File

@ -68,6 +68,8 @@ set_target_properties(${BINARY_NAME}
# them to the application.
include(flutter/generated_plugins.cmake)
target_link_libraries(${BINARY_NAME} PRIVATE ${MIMALLOC_LIB})
# === Installation ===
# By default, "installing" just makes a relocatable bundle in the build