refactor(server): use exiftool for file date metadata (#16453)

* use exiftool for file date metadata

* handle tag not existing in exifinfo (?)

* update medium tests

* fix typo

* set file size too

* set file size only if undefined
This commit is contained in:
Mert
2025-03-06 11:47:12 -05:00
committed by GitHub
parent d01b7a0d67
commit deb399ea15
4 changed files with 85 additions and 52 deletions

View File

@@ -73,7 +73,7 @@ export class MetadataRepository {
inferTimezoneFromDatestamps: true,
inferTimezoneFromTimeStamp: true,
useMWG: true,
numericTags: [...DefaultReadTaskOptions.numericTags, 'FocalLength'],
numericTags: [...DefaultReadTaskOptions.numericTags, 'FocalLength', 'FileSize'],
/* eslint unicorn/no-array-callback-reference: off, unicorn/no-array-method-this-argument: off */
geoTz: (lat, lon) => geotz.find(lat, lon)[0],
// Enable exiftool LFS to parse metadata for files larger than 2GB.