mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
fix bug 1 of #838 : If the tagged video contains only one keyword, the keyword is shown in PiGallery2 character by character, each prefixed by a hash sign, all separated by comma and space
This commit is contained in:
parent
d1684d4c89
commit
75e4ed70b6
@ -144,11 +144,16 @@ export class MetadataLoader {
|
|||||||
if (metadata.keywords === undefined) {
|
if (metadata.keywords === undefined) {
|
||||||
metadata.keywords = [];
|
metadata.keywords = [];
|
||||||
}
|
}
|
||||||
for (const kw of (sidecarData as SideCar).dc.subject) {
|
let keywords = (sidecarData as SideCar).dc.subject || [];
|
||||||
|
if (typeof keywords === 'string') {
|
||||||
|
keywords = [keywords];
|
||||||
|
}
|
||||||
|
for (const kw of keywords) {
|
||||||
if (metadata.keywords.indexOf(kw) === -1) {
|
if (metadata.keywords.indexOf(kw) === -1) {
|
||||||
metadata.keywords.push(kw);
|
metadata.keywords.push(kw);
|
||||||
}
|
}
|
||||||
} }
|
}
|
||||||
|
}
|
||||||
if ((sidecarData as SideCar).xmp.Rating !== undefined) {
|
if ((sidecarData as SideCar).xmp.Rating !== undefined) {
|
||||||
metadata.rating = (sidecarData as SideCar).xmp.Rating;
|
metadata.rating = (sidecarData as SideCar).xmp.Rating;
|
||||||
}
|
}
|
||||||
@ -536,7 +541,11 @@ export class MetadataLoader {
|
|||||||
if (metadata.keywords === undefined) {
|
if (metadata.keywords === undefined) {
|
||||||
metadata.keywords = [];
|
metadata.keywords = [];
|
||||||
}
|
}
|
||||||
for (const kw of (sidecarData as SideCar).dc.subject) {
|
let keywords = (sidecarData as SideCar).dc.subject || [];
|
||||||
|
if (typeof keywords === 'string') {
|
||||||
|
keywords = [keywords];
|
||||||
|
}
|
||||||
|
for (const kw of keywords) {
|
||||||
if (metadata.keywords.indexOf(kw) === -1) {
|
if (metadata.keywords.indexOf(kw) === -1) {
|
||||||
metadata.keywords.push(kw);
|
metadata.keywords.push(kw);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user