Add id3 extractor

This commit is contained in:
2026-03-06 17:03:35 -08:00
parent 32c611186f
commit 77b3125af4
6 changed files with 134 additions and 1 deletions

View File

@@ -4,6 +4,9 @@ use std::{collections::HashMap, rc::Rc};
mod flac;
pub use flac::*;
mod id3;
pub use id3::*;
mod fs;
pub use fs::*;
@@ -48,6 +51,10 @@ impl<'a> MetaExtractor<'a, crate::FileItem> {
Label::new("flac").unwrap(),
crate::PileValue::Extractor(Rc::new(FlacExtractor::new(item))),
),
(
Label::new("id3").unwrap(),
crate::PileValue::Extractor(Rc::new(Id3Extractor::new(item))),
),
(
Label::new("fs").unwrap(),
crate::PileValue::Extractor(Rc::new(FsExtractor::new(item))),
@@ -79,9 +86,10 @@ impl Extractor<crate::FileItem> for MetaExtractor<'_, crate::FileItem> {
fn fields(&self) -> Result<Vec<Label>, std::io::Error> {
return Ok(vec![
Label::new("flac").unwrap(),
Label::new("id3").unwrap(),
Label::new("fs").unwrap(),
Label::new("pdf").unwrap(),
Label::new("sidecar").unwrap(),
]);
}
}
}