Merge pull request #273 from kylmp/exif-timezone
# Conflicts: # app/tests/assetMetadata.test.ts
This commit is contained in:
+11
-1
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user