fix(server): read ISO values above 65535 (#32183)

fix(server): read ISO values above 65535 (#32182)

(cherry picked from commit 6962412c0be35bf21c87d6a5935035adc7ae94e2)

Co-authored-by: bo0tzz <git@bo0tzz.me>
This commit is contained in:
immich-push-o-matic[bot]
2026-10-07 08:16:22 +00:00
committed by GitHub
co-authored by bo0tzz
parent e9f171c441
commit c6c8e516d7
2 changed files with 12 additions and 1 deletions
@@ -329,6 +329,17 @@ describe(MetadataService.name, () => {
});
});
it('should prefer the 32-bit sensitivity tags over a saturated ISO', async () => {
const asset = AssetFactory.create();
mocks.assetJob.getForMetadataExtraction.mockResolvedValue(getForMetadataExtraction(asset));
mockReadTags({ ISO: 65_535, RecommendedExposureIndex: 128_000 });
await sut.handleMetadataExtraction({ id: asset.id });
expect(mocks.asset.upsertExif).toHaveBeenCalledWith(
expect.objectContaining({ exif: expect.objectContaining({ iso: 128_000 }) }),
);
});
it('should not delete latituide and longitude without reverse geocode', async () => {
// regression test for issue 17511
const asset = AssetFactory.from().exif().build();
+1 -1
View File
@@ -298,7 +298,7 @@ export class MetadataService extends BaseService {
exifTags.Author ??
null,
fps: video?.frameRate ?? validate(Number(exifTags.VideoFrameRate!)),
iso: validate(exifTags.ISO) as number,
iso: validate(exifTags.RecommendedExposureIndex ?? exifTags.StandardOutputSensitivity ?? exifTags.ISO) as number,
exposureTime: exifTags.ExposureTime ?? null,
lensModel: getLensModel(exifTags),
fNumber: validate(exifTags.FNumber),