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. --- TODO.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 55f7d52..291a4f4 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,8 @@ # TODO -- **Persist queue state** - Save queue to disk so it survives daemon restarts. +- [x] **Persist queue state** - Queue, shuffle order and play state are written to `~/.local/state/rsplayer/state.json` and restored on start; `rsp resume` picks up a session that was paused when the daemon stopped + +- **Resume mid-track** - Store the playback offset with the queue state and seek there on restore (needs `rsp seek`) - [x] **Dynamic autocompletion of artists, albums and tracks** - `rsp complete [prefix]` queries DB directly; zsh completion wrapper concatenated via install.sh -- cgit v1.2.3