diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-10-07 19:43:13 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-10-07 19:43:13 +0200 |
commit | 1f0445952332d96acadecb936d9eaa7169d52082 (patch) | |
tree | e725d99a19c4b92c6a6850e35c9f9894a6e503eb /src/select/selection_file | |
parent | feat(cli): Also add a `dowa` command (diff) | |
download | yt-1f0445952332d96acadecb936d9eaa7169d52082.tar.gz yt-1f0445952332d96acadecb936d9eaa7169d52082.zip |
feat(cli): Add a `add` command
This command allows adding URLs directly. Otherwise, the process would be: `yt subs add <URL>` -> `yt update` -> `yt subs remove <URL>`
Diffstat (limited to '')
-rw-r--r-- | src/select/selection_file/display.rs | 5 | ||||
-rw-r--r-- | src/select/selection_file/help.str | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/select/selection_file/display.rs b/src/select/selection_file/display.rs index 8ff6a15..0714015 100644 --- a/src/select/selection_file/display.rs +++ b/src/select/selection_file/display.rs @@ -10,7 +10,7 @@ use std::fmt::Write; -use anyhow::Result; +use anyhow::{Context, Result}; use chrono::DateTime; use log::debug; @@ -31,7 +31,8 @@ impl Video { let mut f = String::new(); let opts = get_video_opts(app, &self.extractor_hash) - .await? + .await + .with_context(|| format!("Failed to get video options for video: '{}'", self.title))? .to_cli_flags(app); let opts_white = if !opts.is_empty() { " " } else { "" }; diff --git a/src/select/selection_file/help.str b/src/select/selection_file/help.str index f3ad2f2..eb76ce5 100644 --- a/src/select/selection_file/help.str +++ b/src/select/selection_file/help.str @@ -4,6 +4,7 @@ # d, drop [-p,-s,-l] Mark the video given by the hash to be dropped # u, url [-p,-s,-l] Open the video URL in Firefox's `timesinks.youtube` profile # p, pick [-p,-s,-l] Reset the videos status to 'Pick' +# a, add URL Add a video, defined by the URL # # See `yt select <cmd_name> --help` for more help. # |