ignore "Undefined" EXIF values during extraction
parent
112692eb10
commit
9ee905b3a8
|
@ -13,7 +13,7 @@ use anyhow::{anyhow, Result};
|
|||
|
||||
pub struct ExifExtractor;
|
||||
|
||||
// TODO: EXIF metadata is oftentimes a constant/enum value. What's the proper
|
||||
// TODO: EXIF metadata is oftentimes a constant/enum value. What's the proper
|
||||
// model for enum-like values in UpEnd?
|
||||
|
||||
impl Extractor for ExifExtractor {
|
||||
|
@ -60,6 +60,7 @@ impl Extractor for ExifExtractor {
|
|||
|
||||
let result: Vec<Entry> = exif
|
||||
.fields()
|
||||
.filter(|field| !matches!(field.value, exif::Value::Undefined(..)))
|
||||
.flat_map(|field| {
|
||||
if let Some(tag_description) = field.tag.description() {
|
||||
let attribute = format!("EXIF_{}", field.tag.1);
|
||||
|
|
Loading…
Reference in New Issue