1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-26 10:50:29 +02:00

fix(server): extract image description (#6344)

This commit is contained in:
Tom Vincent 2024-01-15 16:19:41 +00:00 committed by GitHub
parent 4f021a74ed
commit 984feafb90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -39,6 +39,7 @@ describe(`Supported file formats (e2e)`, () => {
make: 'SONY', make: 'SONY',
model: 'DSLR-A550', model: 'DSLR-A550',
orientation: null, orientation: null,
description: 'SONY DSC',
}, },
}, },
{ {
@ -64,6 +65,7 @@ describe(`Supported file formats (e2e)`, () => {
make: 'SONY', make: 'SONY',
model: 'DSLR-A550', model: 'DSLR-A550',
orientation: null, orientation: null,
description: 'SONY DSC',
}, },
}, },
{ {

View File

@ -411,6 +411,7 @@ describe(MetadataService.name, () => {
DateTimeOriginal: new Date('1970-01-01').toISOString(), DateTimeOriginal: new Date('1970-01-01').toISOString(),
ExposureTime: '100ms', ExposureTime: '100ms',
FocalLength: 20, FocalLength: 20,
ImageDescription: 'test description',
ISO: 100, ISO: 100,
LensModel: 'test lens', LensModel: 'test lens',
MediaGroupUUID: 'livePhoto', MediaGroupUUID: 'livePhoto',
@ -432,6 +433,7 @@ describe(MetadataService.name, () => {
bitsPerSample: expect.any(Number), bitsPerSample: expect.any(Number),
colorspace: tags.ColorSpace, colorspace: tags.ColorSpace,
dateTimeOriginal: new Date('1970-01-01'), dateTimeOriginal: new Date('1970-01-01'),
description: tags.ImageDescription,
exifImageHeight: null, exifImageHeight: null,
exifImageWidth: null, exifImageWidth: null,
exposureTime: tags.ExposureTime, exposureTime: tags.ExposureTime,

View File

@ -456,6 +456,7 @@ export class MetadataService {
bitsPerSample: this.getBitsPerSample(tags), bitsPerSample: this.getBitsPerSample(tags),
colorspace: tags.ColorSpace ?? null, colorspace: tags.ColorSpace ?? null,
dateTimeOriginal: this.getDateTimeOriginal(tags) ?? asset.fileCreatedAt, dateTimeOriginal: this.getDateTimeOriginal(tags) ?? asset.fileCreatedAt,
description: (tags.ImageDescription || tags.Description) ?? '',
exifImageHeight: validate(tags.ImageHeight), exifImageHeight: validate(tags.ImageHeight),
exifImageWidth: validate(tags.ImageWidth), exifImageWidth: validate(tags.ImageWidth),
exposureTime: tags.ExposureTime ?? null, exposureTime: tags.ExposureTime ?? null,