about summary refs log tree commit diff stats
path: root/src/cli.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-22 14:23:38 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-22 14:23:38 +0200
commit2fd17e51868b5f25e888b6aee1c1f56f3fbec40b (patch)
tree5ce49ca4092438e47fcb677e6594174bd346fbdb /src/cli.rs
parentfeat(download): Support limiting the downloader by maximal cache size (diff)
downloadyt-2fd17e51868b5f25e888b6aee1c1f56f3fbec40b.tar.gz
yt-2fd17e51868b5f25e888b6aee1c1f56f3fbec40b.zip
feat(select/file): Allow `--priority` argument to all functions
This allows setting a priority even on picked videos.
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cli.rs b/src/cli.rs
index a61a57e..34a98a6 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -197,6 +197,10 @@ pub enum SubscriptionCommand {
 #[command(infer_subcommands = true)]
 /// Mark the video given by the hash to be watched
 pub struct SharedSelectionCommandArgs {
+    /// The ordering priority (higher means more at the top)
+    #[arg(short, long)]
+    pub priority: Option<i64>,
+
     /// The short extractor hash
     pub hash: LazyExtractorHash,
 
@@ -226,15 +230,12 @@ pub enum SelectCommand {
         #[command(flatten)]
         shared: SharedSelectionCommandArgs,
 
-        /// The ordering priority (higher means more at the top)
-        #[arg(short, long)]
-        priority: Option<i64>,
-
         /// The subtitles to download (e.g. 'en,de,sv')
         #[arg(short = 'l', long, default_value = constants::DEFAULT_SUBTITLE_LANGS)]
         subtitle_langs: String,
 
         /// The speed to set mpv to
+        // NOTE: KEEP THIS IN SYNC WITH THE `DEFAULT_MPV_PLAYBACK_SPEED` in `constants.rs` <2024-08-20>
         #[arg(short, long, default_value = "2.7")]
         speed: f64,
     },