From 97f068d7540eef46cb324a852d9f19d7e116eaa2 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Sat, 14 Dec 2024 19:31:38 +0100 Subject: [PATCH] fix --- src/yt_meta.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yt_meta.rs b/src/yt_meta.rs index 02665e5..bffbc08 100644 --- a/src/yt_meta.rs +++ b/src/yt_meta.rs @@ -46,7 +46,7 @@ pub fn get_vid_duration(path: &PathBuf) -> Option { let stdout = String::from_utf8_lossy(&out.stdout).to_string(); //let stderr = String::from_utf8_lossy(&out.stderr).to_string(); - let val: f64 = stdout.trim().parse().unwrap(); + let val: f64 = stdout.trim().parse().unwrap_or(0.0); log::info!("Extracted Duration from {path:?}"); Some(val) }