mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Merge pull request #860 from martyone/xmp-no-rating
Deal with rating missing in XMP sidecars
This commit is contained in:
commit
d0c59244ae
@ -175,7 +175,10 @@ export class MetadataLoader {
|
||||
delete (sidecarData as any)['xap'];
|
||||
}
|
||||
if ((sidecarData as SideCar).xmp !== undefined) {
|
||||
if ((sidecarData as SideCar).xmp.Rating !== undefined) {
|
||||
if (
|
||||
(sidecarData as SideCar).xmp.Rating !== undefined &&
|
||||
(sidecarData as SideCar).xmp.Rating > 0
|
||||
) {
|
||||
metadata.rating = (sidecarData as SideCar).xmp.Rating;
|
||||
}
|
||||
if (
|
||||
@ -651,7 +654,10 @@ export class MetadataLoader {
|
||||
delete (sidecarData as any)['xap'];
|
||||
}
|
||||
if ((sidecarData as SideCar).xmp !== undefined) {
|
||||
if ((sidecarData as SideCar).xmp.Rating !== undefined) {
|
||||
if (
|
||||
(sidecarData as SideCar).xmp.Rating !== undefined &&
|
||||
(sidecarData as SideCar).xmp.Rating > 0
|
||||
) {
|
||||
metadata.rating = (sidecarData as SideCar).xmp.Rating;
|
||||
}
|
||||
if (
|
||||
|
@ -10,6 +10,5 @@
|
||||
"book",
|
||||
"first",
|
||||
"second"
|
||||
],
|
||||
"rating": 0
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user