From 1f0445952332d96acadecb936d9eaa7169d52082 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 7 Oct 2024 19:43:13 +0200 Subject: feat(cli): Add a `add` command This command allows adding URLs directly. Otherwise, the process would be: `yt subs add ` -> `yt update` -> `yt subs remove ` --- src/update/mod.rs | 66 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 23 deletions(-) (limited to 'src/update/mod.rs') diff --git a/src/update/mod.rs b/src/update/mod.rs index ce0a7e5..ce3a7f9 100644 --- a/src/update/mod.rs +++ b/src/update/mod.rs @@ -120,12 +120,7 @@ pub async fn update( Ok(()) } -async fn process_subscription( - app: &App, - sub: &Subscription, - entry: InfoJson, - hashes: &[blake3::Hash], -) -> Result<()> { +pub fn video_entry_to_video(entry: InfoJson, sub: Option<&Subscription>) -> Result