mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Removed 0 as a rating, since it means unrated.
This commit is contained in:
parent
b071b6daae
commit
9aab44b7af
@ -515,7 +515,7 @@ export class MetadataLoader {
|
|||||||
if (exif.xmp &&
|
if (exif.xmp &&
|
||||||
exif.xmp.Rating !== undefined) {
|
exif.xmp.Rating !== undefined) {
|
||||||
const rting = Math.round(exif.xmp.Rating);
|
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.
|
//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
|
//Rating 0 means "unrated" according to adobe's spec, so we delete the attribute in pigallery for the same effect
|
||||||
delete metadata.rating;
|
delete metadata.rating;
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
"width": 10,
|
"width": 10,
|
||||||
"height": 5
|
"height": 5
|
||||||
},
|
},
|
||||||
"rating": 0,
|
|
||||||
"creationDate": 1710188754000,
|
"creationDate": 1710188754000,
|
||||||
"fileSize": 5095,
|
"fileSize": 5095,
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
},
|
},
|
||||||
"creationDate": 1710188754000,
|
"creationDate": 1710188754000,
|
||||||
"fileSize": 5095,
|
"fileSize": 5095,
|
||||||
"rating": 0,
|
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"floor",
|
"floor",
|
||||||
"book",
|
"book",
|
||||||
|
Loading…
Reference in New Issue
Block a user