fix: ignore episodes in tracks

This commit is contained in:
Kingkor Roy Tirtho 2024-03-20 23:36:41 +06:00
parent 75b05f3dc8
commit 2f6fa7add1
3 changed files with 7 additions and 2 deletions

View File

@ -62,7 +62,7 @@ class BlackListNotifier
final containsTrackArtists = track.artists?.any(
(artist) => state.contains(
BlacklistedElement.artist(artist.id!, artist.name!),
BlacklistedElement.artist(artist.id!, artist.name ?? "Spotify"),
),
) ??
false;

View File

@ -36,7 +36,9 @@ class PlaylistTracksNotifier extends AutoDisposeFamilyPaginatedAsyncNotifier<
/// Filter out tracks with null id because some personal playlists
/// may contain local tracks that are not available in the Spotify catalog
return tracks.items?.where((track) => track.id != null).toList() ??
return tracks.items
?.where((track) => track.id != null && track.type == "track")
.toList() ??
<Track>[];
}

View File

@ -61,6 +61,9 @@ abstract class TypeConversionUtils {
.entries
.map(
(artist) => Builder(builder: (context) {
if (artist.value.name == null) {
return Text("Spotify", style: textStyle);
}
return AnchorButton(
(artist.key != artists.length - 1)
? "${artist.value.name}, "