mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
#267 add XMP 'subject' to 'keywords' with proper encoding
This commit is contained in:
parent
bd3db9a308
commit
f8b68e5c2c
@ -216,10 +216,14 @@ 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 && exif.subject.value.length > 0){
|
||||
if(metadata.keywords == undefined) {
|
||||
metadata.keywords = [];
|
||||
}
|
||||
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);
|
||||
const kw = exif.subject.value[i].description;
|
||||
if(metadata.keywords.indexOf(kw) == -1) {
|
||||
metadata.keywords.push(kw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
}
|
||||
],
|
||||
"fileSize": 4381,
|
||||
"keywords": [],
|
||||
"orientation": 1,
|
||||
"size": {
|
||||
"height": 26,
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 4.6 KiB |
@ -8,17 +8,15 @@
|
||||
"model": "SM-G975F"
|
||||
},
|
||||
"creationDate": 1614703656000,
|
||||
"fileSize": 7909,
|
||||
"fileSize": 4709,
|
||||
"orientation": 1,
|
||||
"rating": 50,
|
||||
"Rating": 3,
|
||||
"keywords": [
|
||||
"Max",
|
||||
"Spaß",
|
||||
"Yanik"
|
||||
],
|
||||
"size": {
|
||||
"height": 47,
|
||||
"width": 100
|
||||
"height": 5,
|
||||
"width": 10
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user