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 --- AGENTS.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index 7dded6c..6782574 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -11,7 +11,7 @@ Run these before completing any task: - Build: `cargo build` ## Development Workflow -- Use `rsp restart` or `rsplayer restart` to kill any running daemon and start a new one (useful during development) +- Use `rsp restart` to kill any running daemon and start a new one (useful during development) - Daemon runs in background; restart command handles cleanup automatically - After making changes to audio/playback/daemon code, always restart the daemon to test changes @@ -20,7 +20,7 @@ Run these before completing any task: - Follow standard Rust style (enforced by `cargo fmt`) - Never commit changes unless explicitly requested by the user - Update shell completions when adding/modifying CLI subcommands -- Use `rand` crate for shuffle/randomization features (added in v0.9) +- Use `rand` crate for shuffle/randomization features ## Task-Specific Guidelines - **CLI changes**: Update clap subcommands (including `rsp scan` and `rsp settings`) and regenerate shell completion scripts @@ -33,7 +33,7 @@ Run these before completing any task: - **Scrobbling changes**: Update Last.fm/ListenBrainz client implementation - **Config/Settings changes**: Update config schema, `rsp settings` subcommands, and scan interval/auto-scan logic -## Completed Features (Phase 2) +## Completed Features - [x] Unix socket daemon IPC - [x] Audio engine with play/pause/stop/volume - [x] Queue system with in-memory tracking and auto-advance @@ -42,16 +42,16 @@ Run these before completing any task: - [x] Resume CLI subcommand - [x] Directory playback - queues all audio files in folder recursively - [x] Fixed audio buffer underrun issues by using device default sample rate -- [x] Queue display with pager support (`rsplayer queue`) +- [x] Queue display with pager support (`rsp queue`) - [x] Auto-play next track when current track ends - [x] Metadata extraction and display (INDEX. ARTIST - TITLE format, falls back to filename) +- [x] `rsp scan` with `--force` and `--paths` options +- [x] `rsp settings` subcommands (get/set/list/unset) +- [x] Shell completions (`rsp completions bash|zsh|fish|powershell|elvish`) +- [x] Unit tests for Player, Track, and ShuffleMode ## Remaining Work -- Album shuffle mode (`ShuffleMode::Album`) -- Database integration for queue persistence -- `rsplayer queue` command for queue management +- Queue state persistence to disk +- Album shuffle mode with proper album/folder grouping - Scrobbling (Last.fm/ListenBrainz) -- Database scanning and schema -- Shell completion scripts -- Systemd service unit -- MPRIS/playerctl integration (zbus requires async, needs refactoring) +- Systemd service unit \ No newline at end of file -- cgit v1.2.3