diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-23 13:58:40 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-23 13:58:40 +0200 |
commit | 86e9c745681a6cde96e1089b9a70f7cd2397a720 (patch) | |
tree | 6e45077a74f0d780be455ac95dbed36f715fc727 /src/cli.rs | |
parent | feat(watch/events): Add further understood script-messages (diff) | |
download | yt-86e9c745681a6cde96e1089b9a70f7cd2397a720.tar.gz yt-86e9c745681a6cde96e1089b9a70f7cd2397a720.zip |
fix(treewide): Actually use the values from the config
Diffstat (limited to 'src/cli.rs')
-rw-r--r-- | src/cli.rs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/cli.rs b/src/cli.rs index 05c78de..d3ec262 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -11,15 +11,12 @@ use std::path::PathBuf; use anyhow::Context; +use bytes::Bytes; use chrono::NaiveDate; use clap::{ArgAction, Args, Parser, Subcommand}; use url::Url; -use bytes::Bytes; use crate::{ - config::{ - default::{download, select, update}, - }, select::selection_file::duration::Duration, storage::video_database::extractor_hash::LazyExtractorHash, }; @@ -60,8 +57,8 @@ pub enum Command { /// The maximum size the download dir should have. Beware that the value must be given in /// bytes. - #[arg(short, long, default_value = download::max_cache_size(), value_parser = byte_parser)] - max_cache_size: u64, + #[arg(short, long, value_parser = byte_parser)] + max_cache_size: Option<u64>, }, /// Watch the already cached (and selected) videos @@ -96,9 +93,9 @@ pub enum Command { /// Update the video database Update { - #[arg(short, long, default_value_t = update::max_backlog() as u32)] + #[arg(short, long)] /// The number of videos to updating - max_backlog: u32, + max_backlog: Option<u32>, #[arg(short, long)] /// The subscriptions to update (can be given multiple times) @@ -200,12 +197,12 @@ pub enum SelectCommand { shared: SharedSelectionCommandArgs, /// The subtitles to download (e.g. 'en,de,sv') - #[arg(short = 'l', long, default_value = select::subtitle_langs())] - subtitle_langs: String, + #[arg(short = 'l', long)] + subtitle_langs: Option<String>, /// The speed to set mpv to - #[arg(short, long, default_value_t = select::playback_speed())] - speed: f64, + #[arg(short, long)] + speed: Option<f64>, }, /// Mark the video given by the hash to be dropped |