aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
authorsalmonik <raisersoft@proton.me>2026-05-06 13:20:02 +0200
committersalmonik <raisersoft@proton.me>2026-05-06 13:20:02 +0200
commit932436d47af1c73b6d5781dedec84bd82bfe7ff4 (patch)
tree436d0554710e06b94ed62d5d429adff82f5c5fdb /src/cli.rs
parentAdd install script, shell completions, and systemd service (diff)
downloadrsplayer-932436d47af1c73b6d5781dedec84bd82bfe7ff4.tar.gz
rsplayer-932436d47af1c73b6d5781dedec84bd82bfe7ff4.zip
Add toggle command to resume/pause playback and fix queue display bug
- 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
Diffstat (limited to '')
-rw-r--r--src/cli.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs
index a18b8f1..0da3078 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -37,6 +37,8 @@ pub enum Commands {
37 Pause, 37 Pause,
38 /// Resume playback 38 /// Resume playback
39 Resume, 39 Resume,
40 /// Toggle play/pause
41 Toggle,
40 /// Stop playback 42 /// Stop playback
41 StopPlayback, 43 StopPlayback,
42 /// Skip to next track 44 /// Skip to next track
@@ -133,6 +135,9 @@ impl Cli {
133 Commands::Resume => { 135 Commands::Resume => {
134 crate::daemon::send_command("resume".to_string())?; 136 crate::daemon::send_command("resume".to_string())?;
135 } 137 }
138 Commands::Toggle => {
139 crate::daemon::send_command("toggle".to_string())?;
140 }
136 Commands::StopPlayback => { 141 Commands::StopPlayback => {
137 crate::daemon::send_command("stop".to_string())?; 142 crate::daemon::send_command("stop".to_string())?;
138 } 143 }