1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-23 01:27:14 +02:00

Removed 0 as a rating, since it means unrated.

This commit is contained in:
gras 2024-03-30 21:23:10 +01:00
parent b071b6daae
commit 9aab44b7af
3 changed files with 1 additions and 3 deletions

View File

@ -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;

View File

@ -3,7 +3,6 @@
"width": 10,
"height": 5
},
"rating": 0,
"creationDate": 1710188754000,
"fileSize": 5095,
"keywords": [

View File

@ -5,7 +5,6 @@
},
"creationDate": 1710188754000,
"fileSize": 5095,
"rating": 0,
"keywords": [
"floor",
"book",