diff options
| author | salmon <salmonik@tuta.io> | 2026-08-12 02:17:19 +0200 |
|---|---|---|
| committer | salmon <salmonik@tuta.io> | 2026-08-12 02:17:19 +0200 |
| commit | 6f09ab1f647eea41a33643e16320b57eaf40e63c (patch) | |
| tree | 00ac907e48974bd1e04f15b47319ede12294fd4f /src/cli.rs | |
| parent | queue logic fixes (diff) | |
| download | rsplayer-6f09ab1f647eea41a33643e16320b57eaf40e63c.tar.gz rsplayer-6f09ab1f647eea41a33643e16320b57eaf40e63c.zip | |
delete unused path for queue
Diffstat (limited to '')
| -rw-r--r-- | src/cli.rs | 22 |
1 files changed, 5 insertions, 17 deletions
| @@ -64,13 +64,8 @@ pub enum Commands { | |||
| 64 | #[arg(value_name = "MODE")] | 64 | #[arg(value_name = "MODE")] |
| 65 | mode: Option<String>, | 65 | mode: Option<String>, |
| 66 | }, | 66 | }, |
| 67 | /// Queue management | 67 | /// Show the queue |
| 68 | Queue { | 68 | Queue, |
| 69 | #[arg(value_name = "POSITION")] | ||
| 70 | position: Option<String>, | ||
| 71 | #[arg(value_name = "QUERY")] | ||
| 72 | query: Option<String>, | ||
| 73 | }, | ||
| 74 | /// Show player status | 69 | /// Show player status |
| 75 | Status, | 70 | Status, |
| 76 | /// Scan music paths to populate database | 71 | /// Scan music paths to populate database |
| @@ -197,16 +192,9 @@ impl Cli { | |||
| 197 | crate::daemon::send_command("shuffle".to_string())?; | 192 | crate::daemon::send_command("shuffle".to_string())?; |
| 198 | } | 193 | } |
| 199 | } | 194 | } |
| 200 | Commands::Queue { position, query } => match (position, query) { | 195 | Commands::Queue => { |
| 201 | (None, None) => { | 196 | crate::daemon::send_command("queue".to_string())?; |
| 202 | crate::daemon::send_command("queue".to_string())?; | 197 | } |
| 203 | } | ||
| 204 | (pos, Some(q)) => { | ||
| 205 | let pos = pos.as_deref().unwrap_or("last"); | ||
| 206 | crate::daemon::send_command(format!("queue {} {}", pos, q))?; | ||
| 207 | } | ||
| 208 | _ => {} | ||
| 209 | }, | ||
| 210 | Commands::Status => { | 198 | Commands::Status => { |
| 211 | crate::daemon::send_command("status".to_string())?; | 199 | crate::daemon::send_command("status".to_string())?; |
| 212 | } | 200 | } |
