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) }