From 8b2e8172c31c60da19fdef33c966e5a036261730 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Fri, 3 Jul 2026 18:03:22 +0200 Subject: [PATCH] fix: emit yt-dlp stderr on fetch_metadata failure for debuggability --- crates/archivr-core/src/downloader/ytdlp.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/archivr-core/src/downloader/ytdlp.rs b/crates/archivr-core/src/downloader/ytdlp.rs index ba053ee..3cacb98 100644 --- a/crates/archivr-core/src/downloader/ytdlp.rs +++ b/crates/archivr-core/src/downloader/ytdlp.rs @@ -35,8 +35,8 @@ pub fn download(path: String, store_path: &Path, timestamp: &String) -> Result Option { let ytdlp = std::env::var("ARCHIVR_YT_DLP").unwrap_or_else(|_| "yt-dlp".to_string()); @@ -47,6 +47,8 @@ pub fn fetch_metadata(path: &str) -> Option { .ok()?; if !out.status.success() { + let stderr = String::from_utf8_lossy(&out.stderr); + eprintln!("yt-dlp --dump-json failed for {path} (status {:?}): {stderr}", out.status); return None; }