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

#267 add XMP subject to keywords only if keyword is not yet exisiting

This commit is contained in:
kagahd 2021-04-24 16:11:44 +02:00
parent a4cb1188fe
commit bd3db9a308

View File

@ -218,9 +218,11 @@ export class MetadataLoader {
}
if(exif.subject && exif.subject.value){
for(let i=0; i < exif.subject.value.length; i++){
if(metadata.keywords.indexOf(exif.subject.value[i].value) == -1) {
metadata.keywords.push(exif.subject.value[i].value);
}
}
}
if (exif.Orientation) {
metadata.orientation = (parseInt(exif.Orientation.value as any, 10) as any);
if (OrientationTypes.BOTTOM_LEFT < metadata.orientation) {