aboutsummaryrefslogtreecommitdiffstats
path: root/PLAN.md
blob: d04e52886f8b6cf9c06b2a106630a69370f23e29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# rsplayer Project Plan

## Phase 1: Setup & Core ✓
1. Initialize Rust project, add dependencies: `clap` (CLI/autocompletion), `rusqlite` (SQLite), `symphonia`/`cpal` (audio), `directories` (XDG paths), `serde`/`toml` (config), `tokio` (daemon async), `reqwest` (scrobbling). ✓
2. Config stored at `$XDG_CONFIG_HOME/rsplayer/config.toml`: `music_paths` (array of directories to scan), `scan_interval` (optional periodic rescan interval), scrobbling credentials, daemon socket path. ✓
3. SQLite library schema: `artists`, `albums`, `tracks` tables. Implement `rsp scan` to scan all paths in config's `music_paths`, populate/update database. ✓

## Phase 2: Daemon ✓
1. Unix socket daemon (path: `$XDG_RUNTIME_DIR/rsplayer/daemon.sock`) for IPC. ✓
2. Audio engine: Symphonia decode + CPAL output, support play/pause/stop/volume/seek. ✓
3. Queue: in-memory, `last` (append to end, default), `now` (play immediately, ending current song playback), `next` (insert after current). ✓
4. Shuffle modes: `none` (linear playback), `all` (shuffle all tracks), `album` (shuffle within album, structure ready). ✓

## Phase 3: CLI & Completion ✓
1. Clap-based CLI with all subcommands. ✓
2. Shell completions for bash/zsh/fish/powershell/elvish (`rsp completions`). PARTIALLY
3. `rsp status`: show player state, current track, progress, volume, next 2-3 queue items. ✓
4. `rsp queue`: no arguments display current queue; with arguments add items (default `last` behavior). BUGGED
5. `rsp settings` subcommands: `get`, `set`, `list`, `unset` config values. ✓
6. `rsp scan`: `--force` full rescan, `--paths` override config paths. Uses symphonia for metadata. ✓
7. `rsp play`: flexible insert options (`-i`/`--now`, `-n`/`--next`, `-l`/`--last`). ✓

## Phase 4: Polish
1. [ ] Queue state persistence - Save queue to disk so it survives daemon restarts.
2. [ ] Album shuffle mode - Implement proper `ShuffleMode::Album` (shuffle tracks within same album/folder).
3. [ ] Scrobbling - Last.fm and ListenBrainz support via configured credentials.
4. [ ] Logging and error handling improvements.
5. [ ] Systemd service unit for auto-start.