feat(player): restore playback session after process death

Queue, current index, position, and shuffle flag are snapshotted to a
new app_state playback_session table on pause, track change, and queue
mutation (never on position ticks). On launch the session is restored
paused into the mini player; the first play seeks to the saved
position. Plain file paths that no longer exist are dropped, an
explicit stop or mini-player dismiss clears the snapshot, and the
installation-restore guard wipes it alongside the download queue.
This commit is contained in:
zarzet committed 2026-07-26 17:45:50 +07:00
1 parent c9470ef751
commit 54dcdb92dd
3 files changed
+249 -2

No files matched your search

+1
View File
@@ -119,6 +119,7 @@ class _MainShellState extends ConsumerState<MainShell>
);
_initialSafRepairComplete = true;
if (!mounted) return;
unawaited(restorePersistedPlaybackSession());
_setupShareListener();
await _checkSafMigration();
final updateDialogShown = await _checkForUpdates();