🐛 Fix queue view shows wrong of the remote tracks
This commit is contained in:
@@ -238,7 +238,8 @@ class AudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
medias.add(media_kit.Media(uri));
|
// Store the original track path in extras for queue lookup
|
||||||
|
medias.add(media_kit.Media(uri, extras: {'trackPath': item.id}));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (medias.isNotEmpty) {
|
if (medias.isNotEmpty) {
|
||||||
|
|||||||
@@ -1177,7 +1177,7 @@ class _QueueView extends HookConsumerWidget {
|
|||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final media = playlist.medias[index];
|
final media = playlist.medias[index];
|
||||||
final isCurrent = index == playlist.index;
|
final isCurrent = index == playlist.index;
|
||||||
final trackPath = media.uri;
|
final trackPath = media.extras?['trackPath'] ?? media.uri;
|
||||||
final trackAsync = ref.watch(trackByPathProvider(trackPath));
|
final trackAsync = ref.watch(trackByPathProvider(trackPath));
|
||||||
|
|
||||||
return trackAsync.when(
|
return trackAsync.when(
|
||||||
|
|||||||
Reference in New Issue
Block a user