1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

No negative EXIF ratings

This commit is contained in:
Veronika 2022-01-18 12:48:08 +01:00 committed by GitHub
parent 5f6c8323c7
commit 0431ce67e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {