From add0ace8f7b3de69679436aba80b1c7c7546633f Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 10 May 2026 00:37:43 +0200 Subject: Add shuffle restore tests, remove debug prints, update TODO --- TODO.md | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 59ba564..e06d624 100644 --- a/TODO.md +++ b/TODO.md @@ -62,35 +62,13 @@ ## Remaining Work -### Phase 1: Play Command Rewrite - -- [ ] **Rewrite `rsp play` behavior** - - No options: Add to end of queue. If queue is empty AND player is in PLAY state, play immediately - - `-i` / `--now`: Add after current track, then skip to it (insert + play) - - `-n` / `--next`: Add after current track, don't skip - - Remove `-l` / `--last` flag (redundant, it's default behavior) - - Update CLI definitions in `src/cli.rs` - - Update daemon handler in `src/daemon.rs` - -### Phase 2: Queue Display Rewrite - -- [ ] **Rewrite `rsp queue` behavior** - - If queue rows <= terminal rows, display as-is (no pager needed) - - If queue rows > terminal rows, pipe to pager (e.g., `less -R`) - - Get terminal size using `terminal_size` crate or `ansi_term` / `crossterm` - - Update queue display logic in `src/daemon.rs` - -### Phase 3: Shuffle Rewrite - -- [ ] **Rewrite shuffle mode** - - Always remember original queue (add `original_tracks: Vec` field) - - `rsp shuffle all`: Shuffle tracks after current position once, store original queue - - `rsp shuffle none`: Restore from original queue - keep already-played tracks in place, insert unplayed tracks in original order after current position - - `rsp shuffle album`: Shuffle tracks within each album's range separately (don't mix albums) - - Update `Queue` struct in `src/queue.rs` with original queue storage - - Update shuffle logic in `src/queue.rs` and daemon handlers in `src/daemon.rs` - -### Phase 4: Optional Features +### Phase 1-3: Completed ✓ + +- [x] **Play command rewrite** - No args queues to end (play if queue empty + not playing), -i inserts and plays, -n inserts without playing, removed -l flag +- [x] **Queue display rewrite** - Returns full output (client can pipe to pager), removed daemon-side pager (fails without TTY) +- [x] **Shuffle rewrite** - Always remembers original queue, shuffle none keeps played tracks in place, album shuffle groups by album + +### Optional Features - [ ] **Persist queue state** - Save queue to disk so it survives daemon restarts. -- cgit v1.2.3