1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +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',
model: 'DSLR-A550',
orientation: null,
description: 'SONY DSC',
},
},
{
@ -64,6 +65,7 @@ describe(`Supported file formats (e2e)`, () => {
make: 'SONY',
model: 'DSLR-A550',
orientation: null,
description: 'SONY DSC',
},
},
{

View File

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

View File

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