fix: .wavs also detected as audio
parent
b5b05ed852
commit
cfabc5358c
|
@ -87,7 +87,10 @@ impl Extractor for MediaExtractor {
|
|||
}
|
||||
if e.attribute == LABEL_ATTR {
|
||||
if let EntryValue::String(label) = &e.value {
|
||||
return label.ends_with(".ogg") || label.ends_with(".mp3");
|
||||
let label = label.to_lowercase();
|
||||
return label.ends_with(".ogg")
|
||||
|| label.ends_with(".mp3")
|
||||
|| label.ends_with(".wav");
|
||||
}
|
||||
}
|
||||
false
|
||||
|
|
|
@ -11,8 +11,8 @@ export function getTypes(entity: UpObject, entityInfo: EntityInfo) {
|
|||
const audio =
|
||||
(["audio", "application/x-riff"].some((p) => mimeType.startsWith(p)) &&
|
||||
!video) ||
|
||||
[".ogg", ".mp3"].some((suffix) =>
|
||||
entity?.identify().some((l) => l.endsWith(suffix))
|
||||
[".ogg", ".mp3", ".wav"].some((suffix) =>
|
||||
entity?.identify().some((l) => l.toLowerCase().endsWith(suffix))
|
||||
);
|
||||
const image = mimeType.startsWith("image");
|
||||
const text = mimeType.startsWith("text");
|
||||
|
|
Loading…
Reference in New Issue