diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-01-03 13:07:30 +0100 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-01-03 13:07:30 +0100 |
commit | 3cd6714bc8aa44dc452f479fadab556cab1d23d6 (patch) | |
tree | 51088962f9361bac449ae89d54c92da443399531 | |
parent | e50b3d67f205a415de9f82d861caca71f74bba79 (diff) |
enable repeat from the command line
-rw-r--r-- | src/main.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 0af0927..94c8b3e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,6 +34,9 @@ struct Args { /// By default the last selected volume is restored when a file is played. #[arg(short = 'v', long = "volume")] volume: Option<f64>, + /// Repeat the current song indefinitely. Can be toggled from the TUI. + #[arg(short = 'R', long = "repeat")] + repeat: bool, } #[derive(Debug)] @@ -138,6 +141,8 @@ impl Instance { instance.files.sort(); instance.list_state.select(Some(0)); + instance.autoplay_state.repeat = instance.args.repeat; + Ok(instance) } |