diff options
Diffstat (limited to '')
| -rw-r--r-- | PLAN.md | 24 |
1 files changed, 24 insertions, 0 deletions
| @@ -0,0 +1,24 @@ | |||
| 1 | # rsplayer Project Plan | ||
| 2 | |||
| 3 | ## Phase 1: Setup & Core | ||
| 4 | 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). | ||
| 5 | 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. Daemon auto-scans configured paths on first run if database is empty/missing. | ||
| 6 | 3. SQLite library schema: `artists`, `albums`, `tracks` tables. Implement `rsp scan` to scan all paths in config's `music_paths`, populate/update database. Support `--force` full rescan, `--paths` override config paths. Auto-scan triggers on first run (if DB empty) and periodically per `scan_interval` config. | ||
| 7 | |||
| 8 | ## Phase 2: Daemon | ||
| 9 | 1. Unix socket daemon (path: `$XDG_RUNTIME_DIR/rsplayer/daemon.sock`) for IPC. | ||
| 10 | 2. Audio engine: Symphonia decode + CPAL output, support play/pause/stop/volume/seek. | ||
| 11 | 3. Queue: in-memory, `last` (append to end, default), `now` (play immediately, ending current song playback), `next` (insert after current). | ||
| 12 | 4. Shuffle modes: `none` (linear playback), `all` (shuffle all tracks), `album` (shuffle within album). | ||
| 13 | 5. Scrobbling: Last.fm and ListenBrainz support via configured credentials. | ||
| 14 | |||
| 15 | ## Phase 3: CLI & Completion | ||
| 16 | 1. Clap-based CLI with all subcommands. Generate shell completions for bash/zsh/fish, suggest database artists/albums/tracks, file paths, and config keys/values. | ||
| 17 | 2. `rsp status`: show player state, current track, progress, volume, next 2-3 queue items. | ||
| 18 | 3. `rsp queue`: no arguments display current queue; with arguments add items (default `last` behavior). | ||
| 19 | 4. `rsp settings` subcommands: `get`, `set`, `list`, `unset` config values (music paths, scrobbling credentials, scan interval, etc.) without manual file editing. | ||
| 20 | |||
| 21 | ## Phase 4: Polish | ||
| 22 | 1. Direct file/folder playback: prioritize database metadata if path matches known artist/album. | ||
| 23 | 2. Logging, systemd service unit, unit tests. | ||
| 24 | 3. Periodic rescan logic per config's `scan_interval`. | ||
