fix: .mp3 override in media extractor

feat/type-attributes
Tomáš Mládek 2022-10-23 11:39:33 +02:00
parent d01868b23e
commit 709fd9eb12
1 changed files with 6 additions and 0 deletions

View File

@ -4,6 +4,7 @@ use super::Extractor;
use crate::{
addressing::Address,
database::{
constants::LABEL_ATTR,
entry::{Entry, EntryValue},
stores::{fs::FILE_MIME_KEY, UpStore},
UpEndConnection,
@ -84,6 +85,11 @@ impl Extractor for MediaExtractor {
return mime.starts_with("audio") || mime.starts_with("video");
}
}
if e.attribute == LABEL_ATTR {
if let EntryValue::String(label) = &e.value {
return label.ends_with(".ogg") || label.ends_with(".mp3");
}
}
false
});