Skip to content

Commit

Permalink
fix(server): extract image description
Browse files Browse the repository at this point in the history
  • Loading branch information
tlvince committed Jan 12, 2024
1 parent a1523a9 commit 1e4c36a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/src/domain/metadata/metadata.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions server/src/domain/metadata/metadata.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ export class MetadataService {
bitsPerSample: this.getBitsPerSample(tags),
colorspace: tags.ColorSpace ?? null,
dateTimeOriginal: this.getDateTimeOriginal(tags) ?? asset.fileCreatedAt,
description: (tags.ImageDescription || tags.Description) ?? null,
exifImageHeight: validate(tags.ImageHeight),
exifImageWidth: validate(tags.ImageWidth),
exposureTime: tags.ExposureTime ?? null,
Expand Down

0 comments on commit 1e4c36a

Please sign in to comment.