Extract FLAC images
This commit is contained in:
@@ -76,17 +76,17 @@ impl<'a> FlacExtractor<'a> {
|
||||
.map(|(k, v)| (k, PileValue::Array(v)))
|
||||
.collect();
|
||||
|
||||
if !raw_images.is_empty() {
|
||||
if let Some(label) = Label::new("images".to_string()) {
|
||||
let images = raw_images
|
||||
.into_iter()
|
||||
.map(|(mime, data)| PileValue::Blob {
|
||||
mime,
|
||||
bytes: Arc::new(data),
|
||||
})
|
||||
.collect();
|
||||
output.insert(label, PileValue::Array(images));
|
||||
}
|
||||
if !raw_images.is_empty()
|
||||
&& let Some(label) = Label::new("images".to_owned())
|
||||
{
|
||||
let images = raw_images
|
||||
.into_iter()
|
||||
.map(|(mime, data)| PileValue::Blob {
|
||||
mime,
|
||||
bytes: Arc::new(data),
|
||||
})
|
||||
.collect();
|
||||
output.insert(label, PileValue::Array(images));
|
||||
}
|
||||
|
||||
let _ = self.output.set(output);
|
||||
|
||||
Reference in New Issue
Block a user