This commit is contained in:
Shrecknt 2025-02-04 02:48:47 -08:00 committed by GitHub
commit 5c2808712e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View file

@ -254,6 +254,7 @@ fn read_vorbis(path: &Path) -> Result<SongTags, Error> {
"COMPOSER" => tags.composer = Some(value),
"GENRE" => tags.genre = Some(value),
"PUBLISHER" => tags.label = Some(value),
"METADATA_BLOCK_PICTURE" => tags.has_artwork = true,
_ => (),
}
}
@ -295,6 +296,7 @@ fn read_opus(path: &Path) -> Result<SongTags, Error> {
"COMPOSER" => tags.composer = Some(value),
"GENRE" => tags.genre = Some(value),
"PUBLISHER" => tags.label = Some(value),
"METADATA_BLOCK_PICTURE" => tags.has_artwork = true,
_ => (),
}
}

View file

@ -205,12 +205,12 @@ fn read_mp4(path: &Path) -> Result<DynamicImage, Error> {
.and_then(|d| image::load_from_memory(d.data).map_err(|e| Error::Image(path.to_owned(), e)))
}
fn read_vorbis(_: &Path) -> Result<DynamicImage, Error> {
Err(Error::UnsupportedFormat("vorbis"))
fn read_vorbis(path: &Path) -> Result<DynamicImage, Error> {
read_flac(path)
}
fn read_opus(_: &Path) -> Result<DynamicImage, Error> {
Err(Error::UnsupportedFormat("opus"))
fn read_opus(path: &Path) -> Result<DynamicImage, Error> {
read_flac(path)
}
#[cfg(test)]