mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-14 03:31:06 +02:00
fix(queue): resolve local album tracks by album_key
Load queue local album tracks from album_key when available and fall back to album/artist matching with empty album_artist handling. Thread album_key through grouped local album rows for more reliable navigation.
This commit is contained in:
1 parent
64b884e27a
commit
ee5ab1a751
3 files changed
+33
-6
No files matched your search
@@ -2456,10 +2456,20 @@ class _QueueTabState extends ConsumerState<QueueTab> {
|
||||
Future<void> _navigateToLocalAlbum(_GroupedLocalAlbum album) async {
|
||||
var tracks = album.tracks;
|
||||
if (tracks.isEmpty && album.displayTrackCount > 0) {
|
||||
final rows = await LibraryDatabase.instance.getQueueLocalAlbumTracks(
|
||||
album.albumName,
|
||||
album.artistName,
|
||||
);
|
||||
var rows = album.albumKey.isNotEmpty
|
||||
? await LibraryDatabase.instance.getQueueLocalAlbumTracksByKey(
|
||||
album.albumKey,
|
||||
)
|
||||
: await LibraryDatabase.instance.getQueueLocalAlbumTracks(
|
||||
album.albumName,
|
||||
album.artistName,
|
||||
);
|
||||
if (rows.isEmpty && album.albumKey.isNotEmpty) {
|
||||
rows = await LibraryDatabase.instance.getQueueLocalAlbumTracks(
|
||||
album.albumName,
|
||||
album.artistName,
|
||||
);
|
||||
}
|
||||
tracks = rows.map(LocalLibraryItem.fromJson).toList(growable: false);
|
||||
if (!mounted) return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user