From 863b4017714130f042f993e7c9d0f3f8adee22bf Mon Sep 17 00:00:00 2001 From: salmonik Date: Mon, 2 Nov 2026 13:12:48 +0100 Subject: state: persist the queue and pick up where playback stopped The queue, its shuffle order and whether playback was running are written to ~/.local/state/rsplayer/state.json whenever they change, and on shutdown, then restored at daemon start. Tracks that disappeared from disk are dropped instead of failing on play. `rsp resume`/`rsp toggle` now start the restored track when nothing is loaded into the engine yet, which is the state right after a restart with a queue that was paused. --- src/main.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index fd60bef..4bc4498 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,7 @@ mod notification; mod playback; mod queue; mod scrobbler; +mod state; use clap::Parser; use cli::Cli; -- cgit v1.2.3