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:
parent
90a6c4b6b1
commit
d788af3a2d
BIN
test/backend/assets/xmp/xmp_subject.jpg
Normal file
BIN
test/backend/assets/xmp/xmp_subject.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.7 KiB |
12
test/backend/assets/xmp/xmp_subject.json
Normal file
12
test/backend/assets/xmp/xmp_subject.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"keywords": [
|
||||
"Max",
|
||||
"Spaß",
|
||||
"Yanik"
|
||||
],
|
||||
"Rating": 3,
|
||||
"size": {
|
||||
"height": 47,
|
||||
"width": 100
|
||||
}
|
||||
}
|
@ -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'));
|
||||
|
Loading…
Reference in New Issue
Block a user