diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/yt/src/select/cmds/add.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/yt/src/select/cmds/add.rs b/crates/yt/src/select/cmds/add.rs index 2fff298..68fd558 100644 --- a/crates/yt/src/select/cmds/add.rs +++ b/crates/yt/src/select/cmds/add.rs @@ -48,6 +48,7 @@ pub(super) async fn add( let hashes = get_all_hashes(app) .await .context("Failed to fetch all video hashes")?; + let extractor_hash = blake3::hash(json_get!(entry, "id", as_str).as_bytes()); if hashes.contains(&extractor_hash) { error!( @@ -61,9 +62,10 @@ pub(super) async fn add( .get("url") .map_or("<Unknown video Url>".to_owned(), ToString::to_string) ))?, - entry - .get("title") - .map_or(String::new(), |title| format!(" ('{title}')")) + entry.get("title").map_or(String::new(), |title| format!( + " (\"{}\")", + json_cast!(title, as_str) + )) ); return Ok(()); } |