diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-02 13:12:48 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-02 13:12:48 +0100 |
| commit | 863b4017714130f042f993e7c9d0f3f8adee22bf (patch) | |
| tree | e5ae8094f6be4f0c0a5332a9ca4bb95c8bf87b18 /src/main.rs | |
| parent | queue: use let chains and tidy imports (diff) | |
| download | rsplayer-863b4017714130f042f993e7c9d0f3f8adee22bf.tar.gz rsplayer-863b4017714130f042f993e7c9d0f3f8adee22bf.zip | |
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.
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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; | |||
| 15 | mod playback; | 15 | mod playback; |
| 16 | mod queue; | 16 | mod queue; |
| 17 | mod scrobbler; | 17 | mod scrobbler; |
| 18 | mod state; | ||
| 18 | 19 | ||
| 19 | use clap::Parser; | 20 | use clap::Parser; |
| 20 | use cli::Cli; | 21 | use cli::Cli; |
