Thumbnails for opus/ogg
This commit is contained in:
parent
7279793d25
commit
59739b5d1f
2 changed files with 6 additions and 4 deletions
src/app
|
@ -255,6 +255,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,
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
@ -296,6 +297,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,
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -206,12 +206,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)]
|
||||
|
|
Loading…
Add table
Reference in a new issue