diff --git a/src/utils/mp3_utils.rs b/src/utils/mp3_utils.rs index f6f93b5..e1e9c85 100644 --- a/src/utils/mp3_utils.rs +++ b/src/utils/mp3_utils.rs @@ -7,7 +7,7 @@ pub fn is_valid_mp3(file: &[u8]) -> bool { let res = mp3_metadata::read_from_slice(file); match res { - Ok(_) => true, + Ok(e) => e.duration.as_secs() > 0, Err(e) => { eprintln!("Error while parsing MP3 file ! {:#?}", e); false