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

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