diff --git a/lib/services/audio_player/audio_player_impl.dart b/lib/services/audio_player/audio_player_impl.dart index 0f8e715c..4576ce8d 100644 --- a/lib/services/audio_player/audio_player_impl.dart +++ b/lib/services/audio_player/audio_player_impl.dart @@ -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; diff --git a/lib/services/custom_spotify_endpoints/spotify_endpoints.dart b/lib/services/custom_spotify_endpoints/spotify_endpoints.dart index 44a507fc..4a55130a 100644 --- a/lib/services/custom_spotify_endpoints/spotify_endpoints.dart +++ b/lib/services/custom_spotify_endpoints/spotify_endpoints.dart @@ -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( diff --git a/lib/services/queries/category.dart b/lib/services/queries/category.dart index e5d0651a..33668d82 100644 --- a/lib/services/queries/category.dart +++ b/lib/services/queries/category.dart @@ -53,7 +53,7 @@ class CategoryQueries { (pageParam, spotify) async { final playlists = await Pages( 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), diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 7e1d5828..8f100774 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -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