From bddd733466fec3c78ffa69736933c02ffdc32cfd Mon Sep 17 00:00:00 2001 From: zarzet Date: Fri, 27 Feb 2026 14:21:02 +0700 Subject: [PATCH] fix: trigger smart queue for local play actions --- lib/providers/playback_provider.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/providers/playback_provider.dart b/lib/providers/playback_provider.dart index 56f4849..d9c698c 100644 --- a/lib/providers/playback_provider.dart +++ b/lib/providers/playback_provider.dart @@ -1282,6 +1282,7 @@ class PlaybackController extends Notifier { required String artist, String album = '', String coverUrl = '', + Track? track, }) async { final requestEpoch = _startNewPlayRequest(); _resetPrefetchCycleState(); @@ -1289,6 +1290,15 @@ class PlaybackController extends Notifier { _pendingResumePosition = null; _pendingResumeIndex = null; final uri = _uriFromPath(path); + final fallbackTrack = Track( + id: path, + name: title, + artistName: artist, + albumName: album, + coverUrl: coverUrl.isNotEmpty ? coverUrl : null, + duration: 0, + source: 'local', + ); final item = PlaybackItem( id: path, title: title, @@ -1298,6 +1308,7 @@ class PlaybackController extends Notifier { sourceUri: uri.toString(), isLocal: true, service: 'offline', + track: track ?? fallbackTrack, ); _clearLyricsForTrackChange(upcomingItem: item);