From 0431ce67e2b88612acd2783ad49fb35be64b4ef2 Mon Sep 17 00:00:00 2001 From: Veronika <24509509+desertwitch@users.noreply.github.com> Date: Tue, 18 Jan 2022 12:48:08 +0100 Subject: [PATCH] No negative EXIF ratings --- src/backend/model/threading/MetadataLoader.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/model/threading/MetadataLoader.ts b/src/backend/model/threading/MetadataLoader.ts index ab794f1f..421143ac 100644 --- a/src/backend/model/threading/MetadataLoader.ts +++ b/src/backend/model/threading/MetadataLoader.ts @@ -221,6 +221,7 @@ export class MetadataLoader { const exif = ExifReader.load(data); if (exif.Rating) { metadata.rating = (parseInt(exif.Rating.value, 10) as any); + if(metadata.rating < 0) { metadata.rating = 0; } } if (exif.subject && exif.subject.value && exif.subject.value.length > 0) { if (metadata.keywords === undefined) {