From b3b7f0f65295f2100eb3c9880e870349c43701a6 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sat, 9 May 2026 15:14:33 +0200 Subject: Major rewrite: play command, queue display, and shuffle modes - 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 --- src/cli.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/cli.rs') diff --git a/src/cli.rs b/src/cli.rs index 0da3078..bd81983 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -21,15 +21,12 @@ pub enum Commands { Restart, /// Play a track, album, or artist Play { - /// Play immediately (add after current and skip to it) - #[arg(short = 'i', long = "now", group = "position")] + /// Add after current track and skip to it + #[arg(short = 'i', long = "now")] now: bool, /// Add to queue after current track (don't skip) - #[arg(short = 'n', long = "next", group = "position")] + #[arg(short = 'n', long = "next")] next: bool, - /// Add to end of queue (default) - #[arg(short = 'l', long = "last", group = "position")] - last: bool, #[arg(value_name = "QUERY")] query: Option, }, @@ -126,7 +123,7 @@ impl Cli { }; crate::daemon::send_command(format!("play {} {}", pos, q))?; } else { - crate::daemon::send_command("play".to_string())?; + crate::daemon::send_command("play last".to_string())?; } } Commands::Pause => { -- cgit v1.2.3