diff options
Diffstat (limited to '')
| -rw-r--r-- | src/cli.rs | 11 |
1 files changed, 4 insertions, 7 deletions
| @@ -21,15 +21,12 @@ pub enum Commands { | |||
| 21 | Restart, | 21 | Restart, |
| 22 | /// Play a track, album, or artist | 22 | /// Play a track, album, or artist |
| 23 | Play { | 23 | Play { |
| 24 | /// Play immediately (add after current and skip to it) | 24 | /// Add after current track and skip to it |
| 25 | #[arg(short = 'i', long = "now", group = "position")] | 25 | #[arg(short = 'i', long = "now")] |
| 26 | now: bool, | 26 | now: bool, |
| 27 | /// Add to queue after current track (don't skip) | 27 | /// Add to queue after current track (don't skip) |
| 28 | #[arg(short = 'n', long = "next", group = "position")] | 28 | #[arg(short = 'n', long = "next")] |
| 29 | next: bool, | 29 | next: bool, |
| 30 | /// Add to end of queue (default) | ||
| 31 | #[arg(short = 'l', long = "last", group = "position")] | ||
| 32 | last: bool, | ||
| 33 | #[arg(value_name = "QUERY")] | 30 | #[arg(value_name = "QUERY")] |
| 34 | query: Option<String>, | 31 | query: Option<String>, |
| 35 | }, | 32 | }, |
| @@ -126,7 +123,7 @@ impl Cli { | |||
| 126 | }; | 123 | }; |
| 127 | crate::daemon::send_command(format!("play {} {}", pos, q))?; | 124 | crate::daemon::send_command(format!("play {} {}", pos, q))?; |
| 128 | } else { | 125 | } else { |
| 129 | crate::daemon::send_command("play".to_string())?; | 126 | crate::daemon::send_command("play last".to_string())?; |
| 130 | } | 127 | } |
| 131 | } | 128 | } |
| 132 | Commands::Pause => { | 129 | Commands::Pause => { |
