diff --git a/src/backend/model/fileaccess/MetadataLoader.ts b/src/backend/model/fileaccess/MetadataLoader.ts index 79abbbf2..5a61af21 100644 --- a/src/backend/model/fileaccess/MetadataLoader.ts +++ b/src/backend/model/fileaccess/MetadataLoader.ts @@ -515,7 +515,7 @@ export class MetadataLoader { if (exif.xmp && exif.xmp.Rating !== undefined) { const rting = Math.round(exif.xmp.Rating); - if (rting < 0) { + if (rting <= 0) { //We map all ratings below 0 to 0. Lightroom supports value -1, but most other tools (including this) don't. //Rating 0 means "unrated" according to adobe's spec, so we delete the attribute in pigallery for the same effect delete metadata.rating; diff --git a/test/backend/assets/sidecar/metadata.json b/test/backend/assets/sidecar/metadata.json index 1f7eab71..3593766b 100644 --- a/test/backend/assets/sidecar/metadata.json +++ b/test/backend/assets/sidecar/metadata.json @@ -3,7 +3,6 @@ "width": 10, "height": 5 }, - "rating": 0, "creationDate": 1710188754000, "fileSize": 5095, "keywords": [ diff --git a/test/backend/assets/sidecar/metadata_v2.json b/test/backend/assets/sidecar/metadata_v2.json index ceda26fb..36a37353 100644 --- a/test/backend/assets/sidecar/metadata_v2.json +++ b/test/backend/assets/sidecar/metadata_v2.json @@ -5,7 +5,6 @@ }, "creationDate": 1710188754000, "fileSize": 5095, - "rating": 0, "keywords": [ "floor", "book",