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

Merge pull request #410 from desertwitch/master

EXIF rating
This commit is contained in:
Patrik J. Braun 2022-01-18 15:13:43 +01:00 committed by GitHub
commit 1d77f09ba1
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) {