mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 13:29:21 +00:00
Fix weak check
This commit is contained in:
parent
afcce8463f
commit
7f9e2549a2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user