ignore "Undefined" EXIF values during extraction

feat/vaults
Tomáš Mládek 2022-03-23 12:43:02 +01:00
parent 112692eb10
commit 9ee905b3a8
1 changed files with 2 additions and 1 deletions

View File

@ -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);