aboutsummaryrefslogtreecommitdiffstats
path: root/src/daemon.rs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* config: parse the config once and reuse it until the file changessalmonik6 days1-26/+28
| | | | | | | | | | | Every command, status line and notification went through Config::load, which reads *and* rewrites config.toml, so `rsp status` alone touched the file on each call. The daemon now keeps a parsed copy and only stats the file to notice outside edits, so `rsp settings set` still takes effect immediately. Config::save refreshes the cached copy too, and Config::config_path is shared by the loader and the cache.
* seek: jump within the current track from the CLI and over MPRISsalmonik6 days1-13/+127
| | | | | | | | | | | | | | `rsp seek 1:30`, `rsp seek +15`, `rsp seek -30` and `rsp seek` (print the position) drive a new AudioCommand that seeks the format reader, resets the decoder and drops the buffered samples, so the cpal stream keeps running and playback continues from the new spot. MPRIS gets a working Seek/SetPosition, reports CanSeek, and the state watcher now emits Seeked when the playhead jumps (not just on track changes), which is what clients need to move their progress bar after an external seek. `rsp status` also reports the position (and duration when known) and says Paused instead of Stopped when a track is loaded but not playing.
* state: persist the queue and pick up where playback stoppedsalmonik6 days1-6/+93
| | | | | | | | | | | The queue, its shuffle order and whether playback was running are written to ~/.local/state/rsplayer/state.json whenever they change, and on shutdown, then restored at daemon start. Tracks that disappeared from disk are dropped instead of failing on play. `rsp resume`/`rsp toggle` now start the restored track when nothing is loaded into the engine yet, which is the state right after a restart with a queue that was paused.
* lyrics: cache lrclib results, redraw cleanly and show a now playing headersalmonik6 days1-36/+145
| | | | | | Plain and unavailable lyrics now wait for a track change instead of exiting, synced frames erase the previous region so shrinking frames do not leave stale text, and lrclib lookups are cached next to the track.
* fix a bug where adding track using `now` when shuffle is on does not work as ↵salmon2026-08-121-7/+7
| | | | expected
* Make daemon socket/PID paths environment-independent; fix rc service HOMEsalmon2026-08-091-11/+3
|
* Actual message when daemon could not be foundsalmon2026-08-091-1/+22
|
* Relative volume via prefixing/suffixing with +/-salmonik2026-07-301-10/+171
|
* Fix synchronous HTTP callssalmonik2026-07-301-87/+107
|
* add MPRIS support and non-blocking notifssalmonik2026-07-061-2/+11
|
* fix -a to work properlysalmonik2026-06-251-74/+112
|
* Add shell path finding as a fallback.salmonik2026-06-231-1/+1
|
* change lrc lyrics display.salmonik2026-06-071-3/+19
|
* Add lyrics supportsalmonik2026-06-071-13/+113
|
* correctly working auto completion for dbsalmonik2026-06-061-82/+31
|
* dirty, broken commitsalmonik2026-06-041-23/+160
|
* Add internet streams supportsalmonik2026-05-271-67/+149
|
* play [track] [-a/--album] optionsalmonik2026-05-271-0/+141
| | | | | if supplied when a track is played, the rest of the album will be queued after the track
* add licensingsalmonik2026-05-261-0/+7
|
* bin size optimizations and queue stopping at the end of itsalmonik2026-05-261-0/+2
|
* Fix metadata extraction for symphonia 0.6 and add Albums shuffle modesalmonik2026-05-221-1/+6
|
* fix for new symphony API and less debug info in releasesalmonik2026-05-181-13/+26
|
* first public release.salmonik2026-05-161-16/+16
|
* Add scrobbling support (Last.fm + ListenBrainz) and rsp settings reloadsalmonik2026-05-161-14/+311
| | | | | | | | | | | | - Full Last.fm API implementation with MD5 signing (track.updateNowPlaying, track.scrobble) - Full ListenBrainz API implementation (/1/submit-listens for playing_now and single) - ScrobbleState in daemon tracking track, start time, and unix timestamp per play - Scrobble threshold: ≥30s play AND (≥half duration OR ≥4 min) - Duration extraction from symphonia codec params into AudioMetadata and Track - Token validation at daemon startup and on config change - ListenBrainz token valid (user: Salmonium) command to re-read config from disk (avoids token in shell history) - Desktop notifications for token validation results - Empty-credential filtering (empty string = no-op)
* aesthetic changessalmonik2026-05-151-0/+7
|
* Add display_format config, fix restart command, clean up config codesalmonik2026-05-111-16/+50
| | | | | | | | | | | - Add display_format option with get/set/list/unset for customizing track display - Add Track::format() supporting $ARTIST, $ALBUM, $TRACK variables - Update queue, status, notifications to use display_format - Fix restart command using wrong subcommand 'start' -> 'start-daemon' - Remove socket_path from config (now computed at runtime from XDG_RUNTIME_DIR) - Consolidate duplicate save() and save_all() into single save() - Fix redundant .clone().clone() in config.rs - Add todo item for caching config in daemon hot paths
* Fix queue display returning nothing - removed daemon pager, return full ↵salmonik2026-05-101-19/+6
| | | | output instead. Increase pre-buffer to 100 packets.
* Fix buffer underrun - pre-decode samples before playbacksalmonik2026-05-091-5/+4
|
* Major rewrite: play command, queue display, and shuffle modessalmonik2026-05-091-5/+9
| | | | | | | | - Play command: no args queues to end (play only if queue empty + player playing), -i inserts after current and skips, -n inserts after current, removed -l flag - Queue display: detect terminal size, use pager only if queue exceeds terminal rows - Shuffle modes: always remember original queue, restore on 'shuffle none', album shuffle shuffles within each album's range separately
* Pad queue display numbers with leading zerossalmonik2026-05-081-2/+2
| | | | | | display_string now takes a total parameter to compute the zero-padding width. Queue positions are formatted as 01, 02, ..., 10 instead of 1, 2, ..., 10, keeping columns aligned.
* Fix shuffle first song not being shuffledsalmonik2026-05-081-3/+2
| | | | | | | | | | | update_shuffle_indices now shuffles all indices when position is 0 (no tracks have been played yet), so the first track played is random instead of always being tracks[0]. Directory playback now uses q.current() to pick the first track, resolving through shuffled indices when shuffle is active. Also pins notify-rust version in Cargo.toml and removes PLAN.md (superseded by TODO.md).
* Add desktop notifications for track changes, queue end, and errorssalmonik2026-05-081-3/+21
| | | | | Uses notify-rust to send D-Bus desktop notifications from the daemon when tracks change, the queue empties, or audio errors occur.
* Extract queue module, add comprehensive tests, fix queue/play bugssalmonik2026-05-081-304/+76
| | | | • Moved Queue, Track, ShuffleMode, AudioMetadata from daemon.rs into new src/queue.rs module with public API\n• Fixed rsp play <file> interrupting active playback (now checks is_playing)\n• Fixed directory play -n/-i inserting files in reverse order (now uses .iter().rev())\n• Removed dead duplicate shuffle handler in process_command\n• Fixed queue display showing (playing) when playback is stopped\n• Added 34 tests covering navigation, shuffle, insert ordering, edge cases, display
* Fix queue bugs: play -i on empty queue, stale track replay after queue ends, ↵salmonik2026-05-071-8/+24
| | | | | | | | | 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
* Add toggle command to resume/pause playback and fix queue display bugsalmonik2026-05-061-1/+14
| | | | | | - Add 'rsp toggle' command to toggle between play and pause - Fix queue display showing wrong track as playing when shuffle is enabled - Update shell completion scripts for new toggle command
* Add dev/release config separation and volume query commandsalmonik2026-05-051-0/+4
|
* Add flexible play command with position flagssalmonik2026-05-051-16/+85
| | | | | | | | | | | | | - Add -i/--now, -n/--next, -l/--last flags to play command: - 'play MUSIC' (default) adds to end of queue and plays - 'play -i MUSIC' inserts after current and skips to it - 'play -n MUSIC' inserts after current, doesn't skip - 'play -l MUSIC' adds to end of queue (default behavior) - Add insert_after_current and track_at methods to Queue in daemon - Update play command handler to handle position arguments - Fix queue display to correctly show playing track (compare track_idx instead of display_idx with current_position)
* Add metadata extraction and display for folder playbacksalmonik2026-05-051-11/+126
| | | | | | Extract ID3/metadata tags from audio files using symphonia and display as 'INDEX. ARTIST - TITLE' format, falling back to filename. Only shows the track number before any slash (e.g., '15' from '15/19').
* fix(audio): resolve deadlock preventing auto-advance to next tracksalmonik2026-05-051-4/+43
| | | | | | | | The audio callback deadlocked when trying to lock audio_data twice, preventing track_ended from being set and breaking auto-advance. Also removed erroneous track_ended.store(true) calls from error paths that were causing incorrect queue advancement when playback failed.
* fix(daemon): robust auto-advance; ensure next track starts even if playback ↵salmonik2026-05-051-0/+574
fails