Merge pull request #273 from kylmp/exif-timezone

# Conflicts:
#	app/tests/assetMetadata.test.ts
This commit is contained in:
Alan Grainger
2026-07-27 11:36:13 +12:00
11 changed files with 173 additions and 33 deletions
+11 -1
View File
@@ -67,7 +67,7 @@ export function displayDimensions (asset: Asset): { width?: number, height?: num
`enabled: true` users).
*/
const EXIF_FIELDS = [
'dateTimeOriginal', 'make', 'model', 'lensModel',
'make', 'model', 'lensModel',
'exposureTime', 'iso', 'fNumber', 'focalLength'
] as const
@@ -75,6 +75,16 @@ const LOCATION_FIELDS = ['city', 'state', 'country'] as const
const EXIF_RULES: FieldRule[] = [
...EXIF_FIELDS.map(copy),
{
flag: 'dateTimeOriginal',
emit: (out, info) => {
if (info.dateTimeOriginal) {
out.dateTimeOriginal = info.dateTimeOriginal
// Never expose the timezone independently of the opted-in date.
if (fieldFlag('exif', 'timeZone') && info.timeZone) out.timeZone = info.timeZone
}
}
},
{
flag: 'fileName',
emit: (out, _info, asset) => {