From 03f4585424d05dd50022759c7ad098fe06277f6e Mon Sep 17 00:00:00 2001 From: salmonik Date: Thu, 7 May 2026 16:16:01 +0200 Subject: Fix queue bugs: play -i on empty queue, stale track replay after queue ends, shuffle preserving current position - insert_after_current: guard against panic on empty queue - play -i (now): skip position increment when queue was empty so track plays - directory last: use audio.is_playing() instead of q.current() to avoid replaying finished track - shuffle: only randomize tracks after current position --- TODO.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 8a3fca8..68a0cf0 100644 --- a/TODO.md +++ b/TODO.md @@ -4,7 +4,7 @@ - [x] **Dev/release build config separation** - Store config next to binary in dev mode, use XDG in release mode. -- [x] **Volume without argument returns current volume** - `rsplayer volume` now returns current level. +- [x] **Volume without argument returns current volume** - `rsp volume` now returns current level. - [x] **Fix SampleRate access in audio.rs:104** - `config.sample_rate().0` is invalid because `cpal::SampleRate` is a type alias for `u32`, not a tuple struct. @@ -14,7 +14,7 @@ - [x] **Run clippy** - All linting checks pass. -- [x] **Run tests** - All tests pass (no tests exist yet). +- [x] **Run tests** - All tests pass. - [x] **Check formatting** - Code formatting is correct. @@ -24,7 +24,7 @@ - [x] **Add Resume CLI subcommand** - Added `Resume` subcommand to CLI so users can resume playback after pause. -- [x] **Implement shuffle mode** - Added shuffle on/off/album functionality with queue management in daemon. Supports `rsplayer shuffle on/off/album` commands. +- [x] **Implement shuffle mode** - Added shuffle on/off/album functionality with queue management in daemon. Supports `rsp shuffle on/off/album` commands. - [x] **Implement next/previous commands** - Next and previous track commands now work with the queue system. @@ -32,7 +32,7 @@ - [x] **Auto-play next track** - Daemon automatically plays next track when current one ends (using `poll_track_ended()`). -- [x] **Queue display with pager** - `rsplayer queue` shows all queued tracks with pager support for long lists. +- [x] **Queue display with pager** - `rsp queue` shows all queued tracks with pager support for long lists. - [x] **Album shuffle mode structure** - `ShuffleMode::Album` added to enum and queue logic (behaves like `All` until database ready). @@ -40,20 +40,20 @@ - [x] **Flexible play command** - Added `-i/--now`, `-n/--next`, `-l/--last` flags to play command: `play MUSIC` (default - add to end and play), `play -i MUSIC` (insert after current and skip to it), `play -n MUSIC` (insert after current, don't skip), `play -l MUSIC` (add to end of queue). Also fixed queue display to correctly show playing track. -## Potential Improvements +- [x] **Add unit tests for Player struct** - Tests added for Player, Track, PlaybackState, and ShuffleMode in `tests/playback.rs`. -- [ ] **Add error handling for audio playback** - Consider more robust error handling in the audio thread. +- [x] **Database scan command** - Implemented `rsp scan` with `--force` full rescan and `--paths` override options. Uses symphonia for metadata extraction. -- [x] **Add unit tests for Player struct** - The `Player` struct in `playback.rs` has no corresponding tests. +- [x] **Settings subcommands** - Implemented `rsp settings get/set/list/unset` for config management. -- [ ] **Persist queue state** - Save queue to disk so it survives daemon restarts. +- [x] **Shell completions** - Generate shell completions with `rsp completions bash|elvish|fish|powershell|zsh`. -- [ ] **Album shuffle mode (database)** - Implement proper `ShuffleMode::Album` when database is ready (shuffle tracks within same album/folder). +## Remaining Work -- [ ] **Scrobbling (Last.fm/ListenBrainz)** - Add scrobbling support via configured credentials. +- [ ] **Persist queue state** - Save queue to disk so it survives daemon restarts. -- [ ] **Database integration** - Scan music paths, populate SQLite database, use for metadata. +- [ ] **Scrobbling (Last.fm/ListenBrainz)** - Add scrobbling support via configured credentials. - [ ] **Shell completion scripts** - Generate bash/zsh/fish completions using clap. -- [ ] **Systemd service unit** - Create systemd service file for auto-start. +- [ ] **Systemd service unit** - Create systemd service file for auto-start. \ No newline at end of file -- cgit v1.2.3