diff --git a/api/src/scanner/processImage.js b/api/src/scanner/processImage.js index 0865c6d..6c43f15 100644 --- a/api/src/scanner/processImage.js +++ b/api/src/scanner/processImage.js @@ -17,6 +17,16 @@ async function addExifTags({ session, photo }) { const rawTags = await exiftool.read(photo.path) + let iso = rawTags.ISO + if (typeof iso != 'Number') { + try { + iso = parseInt(iso) + } catch (e) { + console.log('Could not parse ISO as int', e, e.stack) + iso = undefined + } + } + const photoExif = { camera: rawTags.Model, maker: rawTags.Make, @@ -27,7 +37,7 @@ async function addExifTags({ session, photo }) { fileSize: rawTags.FileSize, exposure: rawTags.ShutterSpeedValue, aperture: rawTags.ApertureValue, - iso: rawTags.ISO, + iso, focalLength: rawTags.FocalLength, flash: rawTags.Flash, }