1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

#267 support XMP tag 'subject'

This commit is contained in:
kagahd 2021-04-23 20:09:33 +02:00
parent 90a6c4b6b1
commit d788af3a2d
3 changed files with 17 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -0,0 +1,12 @@
{
"keywords": [
"Max",
"Spaß",
"Yanik"
],
"Rating": 3,
"size": {
"height": 47,
"width": 100
}
}

View File

@ -26,6 +26,11 @@ describe('MetadataLoader', () => {
expect(Utils.clone(data)).to.be.deep.equal(expected);
});
it('should load xmp section dc:subject into keywords', async () => {
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/xmp/xmp_subject.jpg'));
const expected = require(path.join(__dirname, '/../../../assets/xmp/xmp_subject.json'));
expect(Utils.clone(data)).to.be.deep.equal(expected);
});
it('should load jpg 2', async () => {
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/old_photo.jpg'));