mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-23 01:27:14 +02:00
add unit tests
This commit is contained in:
parent
3ee030d8ba
commit
8702586e9e
BIN
test/backend/assets/sidecar/bunny_1sec.mp4
Normal file
BIN
test/backend/assets/sidecar/bunny_1sec.mp4
Normal file
Binary file not shown.
16
test/backend/assets/sidecar/bunny_1sec.mp4.json
Normal file
16
test/backend/assets/sidecar/bunny_1sec.mp4.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"size": {
|
||||||
|
"width": 640,
|
||||||
|
"height": 360
|
||||||
|
},
|
||||||
|
"bitRate": 1794127,
|
||||||
|
"duration": 290,
|
||||||
|
"creationDate": 1709052692000,
|
||||||
|
"fileSize": 65073,
|
||||||
|
"fps": 40000,
|
||||||
|
"keywords": [
|
||||||
|
"rabbit",
|
||||||
|
"test"
|
||||||
|
],
|
||||||
|
"rating": 4
|
||||||
|
}
|
119
test/backend/assets/sidecar/bunny_1sec.mp4.xmp
Normal file
119
test/backend/assets/sidecar/bunny_1sec.mp4.xmp
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
|
||||||
|
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 12.69'>
|
||||||
|
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:Iptc4xmpExt='http://iptc.org/std/Iptc4xmpExt/2008-02-29/'>
|
||||||
|
<Iptc4xmpExt:audioBitsPerSample>16</Iptc4xmpExt:audioBitsPerSample>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:LImage='http://ns.leiainc.com/photos/1.0/image/'>
|
||||||
|
<LImage:MinorVersion>0.0.0</LImage:MinorVersion>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:dc='http://purl.org/dc/elements/1.1/'>
|
||||||
|
<dc:format>H.264</dc:format>
|
||||||
|
<dc:subject>
|
||||||
|
<rdf:Bag>
|
||||||
|
<rdf:li>rabbit</rdf:li>
|
||||||
|
<rdf:li>test</rdf:li>
|
||||||
|
</rdf:Bag>
|
||||||
|
</dc:subject>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:tiff='http://ns.adobe.com/tiff/1.0/'>
|
||||||
|
<tiff:ImageLength>480</tiff:ImageLength>
|
||||||
|
<tiff:ImageWidth>852</tiff:ImageWidth>
|
||||||
|
<tiff:XResolution>72/1</tiff:XResolution>
|
||||||
|
<tiff:YResolution>72/1</tiff:YResolution>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:xmp='http://ns.adobe.com/xap/1.0/'>
|
||||||
|
<xmp:CreateDate>2018-11-17T20:27:31+01:00</xmp:CreateDate>
|
||||||
|
<xmp:MetadataDate>2018-11-17T20:27:31+01:00</xmp:MetadataDate>
|
||||||
|
<xmp:ModifyDate>2018-11-17T20:27:31+01:00</xmp:ModifyDate>
|
||||||
|
<xmp:Rating>4</xmp:Rating>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:stDim='http://ns.adobe.com/xap/1.0/sType/Dimensions#'
|
||||||
|
xmlns:xmpDM='http://ns.adobe.com/xmp/1.0/DynamicMedia/'>
|
||||||
|
<xmpDM:altTimecode rdf:parseType='Resource'>
|
||||||
|
<xmpDM:timeFormat>25Timecode</xmpDM:timeFormat>
|
||||||
|
<xmpDM:timeValue>00:00:00:00</xmpDM:timeValue>
|
||||||
|
</xmpDM:altTimecode>
|
||||||
|
<xmpDM:audioChannelType>Stereo</xmpDM:audioChannelType>
|
||||||
|
<xmpDM:audioSampleRate>48000</xmpDM:audioSampleRate>
|
||||||
|
<xmpDM:audioSampleType>16Int</xmpDM:audioSampleType>
|
||||||
|
<xmpDM:duration rdf:parseType='Resource'>
|
||||||
|
<xmpDM:scale>1/90000</xmpDM:scale>
|
||||||
|
<xmpDM:value>2928000</xmpDM:value>
|
||||||
|
</xmpDM:duration>
|
||||||
|
<xmpDM:startTimeSampleSize>1</xmpDM:startTimeSampleSize>
|
||||||
|
<xmpDM:startTimeScale>25</xmpDM:startTimeScale>
|
||||||
|
<xmpDM:startTimecode rdf:parseType='Resource'>
|
||||||
|
<xmpDM:timeFormat>25Timecode</xmpDM:timeFormat>
|
||||||
|
<xmpDM:timeValue>00:00:00:00</xmpDM:timeValue>
|
||||||
|
</xmpDM:startTimecode>
|
||||||
|
<xmpDM:videoFieldOrder>Progressive</xmpDM:videoFieldOrder>
|
||||||
|
<xmpDM:videoFrameRate>25.000000</xmpDM:videoFrameRate>
|
||||||
|
<xmpDM:videoFrameSize rdf:parseType='Resource'>
|
||||||
|
<stDim:h>480</stDim:h>
|
||||||
|
<stDim:unit>pixel</stDim:unit>
|
||||||
|
<stDim:w>852</stDim:w>
|
||||||
|
</xmpDM:videoFrameSize>
|
||||||
|
<xmpDM:videoPixelAspectRatio>1/1</xmpDM:videoPixelAspectRatio>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:stEvt='http://ns.adobe.com/xap/1.0/sType/ResourceEvent#'
|
||||||
|
xmlns:stRef='http://ns.adobe.com/xap/1.0/sType/ResourceRef#'
|
||||||
|
xmlns:xmpMM='http://ns.adobe.com/xap/1.0/mm/'>
|
||||||
|
<xmpMM:DerivedFrom rdf:parseType='Resource'>
|
||||||
|
<stRef:documentID>d47681ee-e57e-2256-f455-43c40000004b</stRef:documentID>
|
||||||
|
<stRef:instanceID>2a5a623f-09cc-ea32-5014-869400000078</stRef:instanceID>
|
||||||
|
<stRef:originalDocumentID>xmp.did:5af8e6dd-2af0-e94e-8f3c-767794b3efa1</stRef:originalDocumentID>
|
||||||
|
</xmpMM:DerivedFrom>
|
||||||
|
<xmpMM:DocumentID>b2c5763f-bfb9-7ee1-6893-05220000004b</xmpMM:DocumentID>
|
||||||
|
<xmpMM:History>
|
||||||
|
<rdf:Seq>
|
||||||
|
<rdf:li rdf:parseType='Resource'>
|
||||||
|
<stEvt:action>saved</stEvt:action>
|
||||||
|
<stEvt:changed>/</stEvt:changed>
|
||||||
|
<stEvt:instanceID>63c4c09c-9648-ee43-720e-644600000078</stEvt:instanceID>
|
||||||
|
<stEvt:softwareAgent>Adobe Adobe Media Encoder CC 2017.1 (Windows)</stEvt:softwareAgent>
|
||||||
|
<stEvt:when>2018-11-17T20:27:31+01:00</stEvt:when>
|
||||||
|
</rdf:li>
|
||||||
|
<rdf:li rdf:parseType='Resource'>
|
||||||
|
<stEvt:action>saved</stEvt:action>
|
||||||
|
<stEvt:changed>/</stEvt:changed>
|
||||||
|
<stEvt:instanceID>2a5a623f-09cc-ea32-5014-869400000078</stEvt:instanceID>
|
||||||
|
<stEvt:softwareAgent>Adobe Adobe Media Encoder CC 2017.1 (Windows)</stEvt:softwareAgent>
|
||||||
|
<stEvt:when>2018-11-17T20:26:54+01:00</stEvt:when>
|
||||||
|
</rdf:li>
|
||||||
|
<rdf:li rdf:parseType='Resource'>
|
||||||
|
<stEvt:action>saved</stEvt:action>
|
||||||
|
<stEvt:changed>/</stEvt:changed>
|
||||||
|
<stEvt:instanceID>xmp.iid:6e43712c-17f5-cc4c-b90d-766dca2590dc</stEvt:instanceID>
|
||||||
|
<stEvt:softwareAgent>Adobe Adobe Media Encoder CC 2017.1 (Windows)</stEvt:softwareAgent>
|
||||||
|
<stEvt:when>2018-11-17T20:27:31+01:00</stEvt:when>
|
||||||
|
</rdf:li>
|
||||||
|
<rdf:li rdf:parseType='Resource'>
|
||||||
|
<stEvt:action>saved</stEvt:action>
|
||||||
|
<stEvt:changed>/metadata</stEvt:changed>
|
||||||
|
<stEvt:instanceID>xmp.iid:4d4376d3-c650-354b-b4eb-0fc2d21bcaa4</stEvt:instanceID>
|
||||||
|
<stEvt:softwareAgent>Adobe Adobe Media Encoder CC 2017.1 (Windows)</stEvt:softwareAgent>
|
||||||
|
<stEvt:when>2018-11-17T20:27:31+01:00</stEvt:when>
|
||||||
|
</rdf:li>
|
||||||
|
</rdf:Seq>
|
||||||
|
</xmpMM:History>
|
||||||
|
<xmpMM:InstanceID>xmp.iid:4d4376d3-c650-354b-b4eb-0fc2d21bcaa4</xmpMM:InstanceID>
|
||||||
|
<xmpMM:OriginalDocumentID>xmp.did:1aa2d671-bf82-2043-9053-ec864079866c</xmpMM:OriginalDocumentID>
|
||||||
|
</rdf:Description>
|
||||||
|
</rdf:RDF>
|
||||||
|
</x:xmpmeta>
|
||||||
|
<?xpacket end='w'?>
|
BIN
test/backend/assets/sidecar/bunny_1sec_v2.mp4
Normal file
BIN
test/backend/assets/sidecar/bunny_1sec_v2.mp4
Normal file
Binary file not shown.
119
test/backend/assets/sidecar/bunny_1sec_v2.xmp
Normal file
119
test/backend/assets/sidecar/bunny_1sec_v2.xmp
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
|
||||||
|
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 12.69'>
|
||||||
|
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:Iptc4xmpExt='http://iptc.org/std/Iptc4xmpExt/2008-02-29/'>
|
||||||
|
<Iptc4xmpExt:audioBitsPerSample>16</Iptc4xmpExt:audioBitsPerSample>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:LImage='http://ns.leiainc.com/photos/1.0/image/'>
|
||||||
|
<LImage:MinorVersion>0.0.0</LImage:MinorVersion>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:dc='http://purl.org/dc/elements/1.1/'>
|
||||||
|
<dc:format>H.264</dc:format>
|
||||||
|
<dc:subject>
|
||||||
|
<rdf:Bag>
|
||||||
|
<rdf:li>rabbit</rdf:li>
|
||||||
|
<rdf:li>test</rdf:li>
|
||||||
|
</rdf:Bag>
|
||||||
|
</dc:subject>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:tiff='http://ns.adobe.com/tiff/1.0/'>
|
||||||
|
<tiff:ImageLength>480</tiff:ImageLength>
|
||||||
|
<tiff:ImageWidth>852</tiff:ImageWidth>
|
||||||
|
<tiff:XResolution>72/1</tiff:XResolution>
|
||||||
|
<tiff:YResolution>72/1</tiff:YResolution>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:xmp='http://ns.adobe.com/xap/1.0/'>
|
||||||
|
<xmp:CreateDate>2018-11-17T20:27:31+01:00</xmp:CreateDate>
|
||||||
|
<xmp:MetadataDate>2018-11-17T20:27:31+01:00</xmp:MetadataDate>
|
||||||
|
<xmp:ModifyDate>2018-11-17T20:27:31+01:00</xmp:ModifyDate>
|
||||||
|
<xmp:Rating>4</xmp:Rating>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:stDim='http://ns.adobe.com/xap/1.0/sType/Dimensions#'
|
||||||
|
xmlns:xmpDM='http://ns.adobe.com/xmp/1.0/DynamicMedia/'>
|
||||||
|
<xmpDM:altTimecode rdf:parseType='Resource'>
|
||||||
|
<xmpDM:timeFormat>25Timecode</xmpDM:timeFormat>
|
||||||
|
<xmpDM:timeValue>00:00:00:00</xmpDM:timeValue>
|
||||||
|
</xmpDM:altTimecode>
|
||||||
|
<xmpDM:audioChannelType>Stereo</xmpDM:audioChannelType>
|
||||||
|
<xmpDM:audioSampleRate>48000</xmpDM:audioSampleRate>
|
||||||
|
<xmpDM:audioSampleType>16Int</xmpDM:audioSampleType>
|
||||||
|
<xmpDM:duration rdf:parseType='Resource'>
|
||||||
|
<xmpDM:scale>1/90000</xmpDM:scale>
|
||||||
|
<xmpDM:value>2928000</xmpDM:value>
|
||||||
|
</xmpDM:duration>
|
||||||
|
<xmpDM:startTimeSampleSize>1</xmpDM:startTimeSampleSize>
|
||||||
|
<xmpDM:startTimeScale>25</xmpDM:startTimeScale>
|
||||||
|
<xmpDM:startTimecode rdf:parseType='Resource'>
|
||||||
|
<xmpDM:timeFormat>25Timecode</xmpDM:timeFormat>
|
||||||
|
<xmpDM:timeValue>00:00:00:00</xmpDM:timeValue>
|
||||||
|
</xmpDM:startTimecode>
|
||||||
|
<xmpDM:videoFieldOrder>Progressive</xmpDM:videoFieldOrder>
|
||||||
|
<xmpDM:videoFrameRate>25.000000</xmpDM:videoFrameRate>
|
||||||
|
<xmpDM:videoFrameSize rdf:parseType='Resource'>
|
||||||
|
<stDim:h>480</stDim:h>
|
||||||
|
<stDim:unit>pixel</stDim:unit>
|
||||||
|
<stDim:w>852</stDim:w>
|
||||||
|
</xmpDM:videoFrameSize>
|
||||||
|
<xmpDM:videoPixelAspectRatio>1/1</xmpDM:videoPixelAspectRatio>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:stEvt='http://ns.adobe.com/xap/1.0/sType/ResourceEvent#'
|
||||||
|
xmlns:stRef='http://ns.adobe.com/xap/1.0/sType/ResourceRef#'
|
||||||
|
xmlns:xmpMM='http://ns.adobe.com/xap/1.0/mm/'>
|
||||||
|
<xmpMM:DerivedFrom rdf:parseType='Resource'>
|
||||||
|
<stRef:documentID>d47681ee-e57e-2256-f455-43c40000004b</stRef:documentID>
|
||||||
|
<stRef:instanceID>2a5a623f-09cc-ea32-5014-869400000078</stRef:instanceID>
|
||||||
|
<stRef:originalDocumentID>xmp.did:5af8e6dd-2af0-e94e-8f3c-767794b3efa1</stRef:originalDocumentID>
|
||||||
|
</xmpMM:DerivedFrom>
|
||||||
|
<xmpMM:DocumentID>b2c5763f-bfb9-7ee1-6893-05220000004b</xmpMM:DocumentID>
|
||||||
|
<xmpMM:History>
|
||||||
|
<rdf:Seq>
|
||||||
|
<rdf:li rdf:parseType='Resource'>
|
||||||
|
<stEvt:action>saved</stEvt:action>
|
||||||
|
<stEvt:changed>/</stEvt:changed>
|
||||||
|
<stEvt:instanceID>63c4c09c-9648-ee43-720e-644600000078</stEvt:instanceID>
|
||||||
|
<stEvt:softwareAgent>Adobe Adobe Media Encoder CC 2017.1 (Windows)</stEvt:softwareAgent>
|
||||||
|
<stEvt:when>2018-11-17T20:27:31+01:00</stEvt:when>
|
||||||
|
</rdf:li>
|
||||||
|
<rdf:li rdf:parseType='Resource'>
|
||||||
|
<stEvt:action>saved</stEvt:action>
|
||||||
|
<stEvt:changed>/</stEvt:changed>
|
||||||
|
<stEvt:instanceID>2a5a623f-09cc-ea32-5014-869400000078</stEvt:instanceID>
|
||||||
|
<stEvt:softwareAgent>Adobe Adobe Media Encoder CC 2017.1 (Windows)</stEvt:softwareAgent>
|
||||||
|
<stEvt:when>2018-11-17T20:26:54+01:00</stEvt:when>
|
||||||
|
</rdf:li>
|
||||||
|
<rdf:li rdf:parseType='Resource'>
|
||||||
|
<stEvt:action>saved</stEvt:action>
|
||||||
|
<stEvt:changed>/</stEvt:changed>
|
||||||
|
<stEvt:instanceID>xmp.iid:6e43712c-17f5-cc4c-b90d-766dca2590dc</stEvt:instanceID>
|
||||||
|
<stEvt:softwareAgent>Adobe Adobe Media Encoder CC 2017.1 (Windows)</stEvt:softwareAgent>
|
||||||
|
<stEvt:when>2018-11-17T20:27:31+01:00</stEvt:when>
|
||||||
|
</rdf:li>
|
||||||
|
<rdf:li rdf:parseType='Resource'>
|
||||||
|
<stEvt:action>saved</stEvt:action>
|
||||||
|
<stEvt:changed>/metadata</stEvt:changed>
|
||||||
|
<stEvt:instanceID>xmp.iid:4d4376d3-c650-354b-b4eb-0fc2d21bcaa4</stEvt:instanceID>
|
||||||
|
<stEvt:softwareAgent>Adobe Adobe Media Encoder CC 2017.1 (Windows)</stEvt:softwareAgent>
|
||||||
|
<stEvt:when>2018-11-17T20:27:31+01:00</stEvt:when>
|
||||||
|
</rdf:li>
|
||||||
|
</rdf:Seq>
|
||||||
|
</xmpMM:History>
|
||||||
|
<xmpMM:InstanceID>xmp.iid:4d4376d3-c650-354b-b4eb-0fc2d21bcaa4</xmpMM:InstanceID>
|
||||||
|
<xmpMM:OriginalDocumentID>xmp.did:1aa2d671-bf82-2043-9053-ec864079866c</xmpMM:OriginalDocumentID>
|
||||||
|
</rdf:Description>
|
||||||
|
</rdf:RDF>
|
||||||
|
</x:xmpmeta>
|
||||||
|
<?xpacket end='w'?>
|
BIN
test/backend/assets/sidecar/bunny_1sec_v3.mp4
Normal file
BIN
test/backend/assets/sidecar/bunny_1sec_v3.mp4
Normal file
Binary file not shown.
15
test/backend/assets/sidecar/bunny_1sec_v3.mp4.json
Normal file
15
test/backend/assets/sidecar/bunny_1sec_v3.mp4.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"size": {
|
||||||
|
"width": 640,
|
||||||
|
"height": 360
|
||||||
|
},
|
||||||
|
"bitRate": 1794127,
|
||||||
|
"duration": 290,
|
||||||
|
"creationDate": 1709052692000,
|
||||||
|
"fileSize": 65073,
|
||||||
|
"fps": 40000,
|
||||||
|
"keywords": [
|
||||||
|
"rabbit"
|
||||||
|
],
|
||||||
|
"rating": 4
|
||||||
|
}
|
118
test/backend/assets/sidecar/bunny_1sec_v3.xmp
Normal file
118
test/backend/assets/sidecar/bunny_1sec_v3.xmp
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
|
||||||
|
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 12.69'>
|
||||||
|
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:Iptc4xmpExt='http://iptc.org/std/Iptc4xmpExt/2008-02-29/'>
|
||||||
|
<Iptc4xmpExt:audioBitsPerSample>16</Iptc4xmpExt:audioBitsPerSample>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:LImage='http://ns.leiainc.com/photos/1.0/image/'>
|
||||||
|
<LImage:MinorVersion>0.0.0</LImage:MinorVersion>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:dc='http://purl.org/dc/elements/1.1/'>
|
||||||
|
<dc:format>H.264</dc:format>
|
||||||
|
<dc:subject>
|
||||||
|
<rdf:Bag>
|
||||||
|
<rdf:li>rabbit</rdf:li>
|
||||||
|
</rdf:Bag>
|
||||||
|
</dc:subject>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:tiff='http://ns.adobe.com/tiff/1.0/'>
|
||||||
|
<tiff:ImageLength>480</tiff:ImageLength>
|
||||||
|
<tiff:ImageWidth>852</tiff:ImageWidth>
|
||||||
|
<tiff:XResolution>72/1</tiff:XResolution>
|
||||||
|
<tiff:YResolution>72/1</tiff:YResolution>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:xmp='http://ns.adobe.com/xap/1.0/'>
|
||||||
|
<xmp:CreateDate>2018-11-17T20:27:31+01:00</xmp:CreateDate>
|
||||||
|
<xmp:MetadataDate>2018-11-17T20:27:31+01:00</xmp:MetadataDate>
|
||||||
|
<xmp:ModifyDate>2018-11-17T20:27:31+01:00</xmp:ModifyDate>
|
||||||
|
<xmp:Rating>4</xmp:Rating>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:stDim='http://ns.adobe.com/xap/1.0/sType/Dimensions#'
|
||||||
|
xmlns:xmpDM='http://ns.adobe.com/xmp/1.0/DynamicMedia/'>
|
||||||
|
<xmpDM:altTimecode rdf:parseType='Resource'>
|
||||||
|
<xmpDM:timeFormat>25Timecode</xmpDM:timeFormat>
|
||||||
|
<xmpDM:timeValue>00:00:00:00</xmpDM:timeValue>
|
||||||
|
</xmpDM:altTimecode>
|
||||||
|
<xmpDM:audioChannelType>Stereo</xmpDM:audioChannelType>
|
||||||
|
<xmpDM:audioSampleRate>48000</xmpDM:audioSampleRate>
|
||||||
|
<xmpDM:audioSampleType>16Int</xmpDM:audioSampleType>
|
||||||
|
<xmpDM:duration rdf:parseType='Resource'>
|
||||||
|
<xmpDM:scale>1/90000</xmpDM:scale>
|
||||||
|
<xmpDM:value>2928000</xmpDM:value>
|
||||||
|
</xmpDM:duration>
|
||||||
|
<xmpDM:startTimeSampleSize>1</xmpDM:startTimeSampleSize>
|
||||||
|
<xmpDM:startTimeScale>25</xmpDM:startTimeScale>
|
||||||
|
<xmpDM:startTimecode rdf:parseType='Resource'>
|
||||||
|
<xmpDM:timeFormat>25Timecode</xmpDM:timeFormat>
|
||||||
|
<xmpDM:timeValue>00:00:00:00</xmpDM:timeValue>
|
||||||
|
</xmpDM:startTimecode>
|
||||||
|
<xmpDM:videoFieldOrder>Progressive</xmpDM:videoFieldOrder>
|
||||||
|
<xmpDM:videoFrameRate>25.000000</xmpDM:videoFrameRate>
|
||||||
|
<xmpDM:videoFrameSize rdf:parseType='Resource'>
|
||||||
|
<stDim:h>480</stDim:h>
|
||||||
|
<stDim:unit>pixel</stDim:unit>
|
||||||
|
<stDim:w>852</stDim:w>
|
||||||
|
</xmpDM:videoFrameSize>
|
||||||
|
<xmpDM:videoPixelAspectRatio>1/1</xmpDM:videoPixelAspectRatio>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about=''
|
||||||
|
xmlns:stEvt='http://ns.adobe.com/xap/1.0/sType/ResourceEvent#'
|
||||||
|
xmlns:stRef='http://ns.adobe.com/xap/1.0/sType/ResourceRef#'
|
||||||
|
xmlns:xmpMM='http://ns.adobe.com/xap/1.0/mm/'>
|
||||||
|
<xmpMM:DerivedFrom rdf:parseType='Resource'>
|
||||||
|
<stRef:documentID>d47681ee-e57e-2256-f455-43c40000004b</stRef:documentID>
|
||||||
|
<stRef:instanceID>2a5a623f-09cc-ea32-5014-869400000078</stRef:instanceID>
|
||||||
|
<stRef:originalDocumentID>xmp.did:5af8e6dd-2af0-e94e-8f3c-767794b3efa1</stRef:originalDocumentID>
|
||||||
|
</xmpMM:DerivedFrom>
|
||||||
|
<xmpMM:DocumentID>b2c5763f-bfb9-7ee1-6893-05220000004b</xmpMM:DocumentID>
|
||||||
|
<xmpMM:History>
|
||||||
|
<rdf:Seq>
|
||||||
|
<rdf:li rdf:parseType='Resource'>
|
||||||
|
<stEvt:action>saved</stEvt:action>
|
||||||
|
<stEvt:changed>/</stEvt:changed>
|
||||||
|
<stEvt:instanceID>63c4c09c-9648-ee43-720e-644600000078</stEvt:instanceID>
|
||||||
|
<stEvt:softwareAgent>Adobe Adobe Media Encoder CC 2017.1 (Windows)</stEvt:softwareAgent>
|
||||||
|
<stEvt:when>2018-11-17T20:27:31+01:00</stEvt:when>
|
||||||
|
</rdf:li>
|
||||||
|
<rdf:li rdf:parseType='Resource'>
|
||||||
|
<stEvt:action>saved</stEvt:action>
|
||||||
|
<stEvt:changed>/</stEvt:changed>
|
||||||
|
<stEvt:instanceID>2a5a623f-09cc-ea32-5014-869400000078</stEvt:instanceID>
|
||||||
|
<stEvt:softwareAgent>Adobe Adobe Media Encoder CC 2017.1 (Windows)</stEvt:softwareAgent>
|
||||||
|
<stEvt:when>2018-11-17T20:26:54+01:00</stEvt:when>
|
||||||
|
</rdf:li>
|
||||||
|
<rdf:li rdf:parseType='Resource'>
|
||||||
|
<stEvt:action>saved</stEvt:action>
|
||||||
|
<stEvt:changed>/</stEvt:changed>
|
||||||
|
<stEvt:instanceID>xmp.iid:6e43712c-17f5-cc4c-b90d-766dca2590dc</stEvt:instanceID>
|
||||||
|
<stEvt:softwareAgent>Adobe Adobe Media Encoder CC 2017.1 (Windows)</stEvt:softwareAgent>
|
||||||
|
<stEvt:when>2018-11-17T20:27:31+01:00</stEvt:when>
|
||||||
|
</rdf:li>
|
||||||
|
<rdf:li rdf:parseType='Resource'>
|
||||||
|
<stEvt:action>saved</stEvt:action>
|
||||||
|
<stEvt:changed>/metadata</stEvt:changed>
|
||||||
|
<stEvt:instanceID>xmp.iid:4d4376d3-c650-354b-b4eb-0fc2d21bcaa4</stEvt:instanceID>
|
||||||
|
<stEvt:softwareAgent>Adobe Adobe Media Encoder CC 2017.1 (Windows)</stEvt:softwareAgent>
|
||||||
|
<stEvt:when>2018-11-17T20:27:31+01:00</stEvt:when>
|
||||||
|
</rdf:li>
|
||||||
|
</rdf:Seq>
|
||||||
|
</xmpMM:History>
|
||||||
|
<xmpMM:InstanceID>xmp.iid:4d4376d3-c650-354b-b4eb-0fc2d21bcaa4</xmpMM:InstanceID>
|
||||||
|
<xmpMM:OriginalDocumentID>xmp.did:1aa2d671-bf82-2043-9053-ec864079866c</xmpMM:OriginalDocumentID>
|
||||||
|
</rdf:Description>
|
||||||
|
</rdf:RDF>
|
||||||
|
</x:xmpmeta>
|
||||||
|
<?xpacket end='w'?>
|
BIN
test/backend/assets/sidecar/no_metadata.jpg
Normal file
BIN
test/backend/assets/sidecar/no_metadata.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
12
test/backend/assets/sidecar/no_metadata.jpg.json
Normal file
12
test/backend/assets/sidecar/no_metadata.jpg.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"size": {
|
||||||
|
"width": 10,
|
||||||
|
"height": 5
|
||||||
|
},
|
||||||
|
"creationDate": 1709057753000,
|
||||||
|
"fileSize": 1430,
|
||||||
|
"keywords": [
|
||||||
|
"first",
|
||||||
|
"second"
|
||||||
|
]
|
||||||
|
}
|
17
test/backend/assets/sidecar/no_metadata.jpg.xmp
Normal file
17
test/backend/assets/sidecar/no_metadata.jpg.xmp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
|
||||||
|
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
|
||||||
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||||
|
<rdf:Description rdf:about=""
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:fstop="http://www.fstopapp.com/xmp/"
|
||||||
|
fstop:favorite="0">
|
||||||
|
<dc:subject>
|
||||||
|
<rdf:Bag>
|
||||||
|
<rdf:li>first</rdf:li>
|
||||||
|
<rdf:li>second</rdf:li>
|
||||||
|
</rdf:Bag>
|
||||||
|
</dc:subject>
|
||||||
|
</rdf:Description>
|
||||||
|
</rdf:RDF>
|
||||||
|
</x:xmpmeta>
|
||||||
|
<?xpacket end="w"?>
|
BIN
test/backend/assets/sidecar/no_metadata_v2.jpg
Normal file
BIN
test/backend/assets/sidecar/no_metadata_v2.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
17
test/backend/assets/sidecar/no_metadata_v2.xmp
Normal file
17
test/backend/assets/sidecar/no_metadata_v2.xmp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
|
||||||
|
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
|
||||||
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||||
|
<rdf:Description rdf:about=""
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:fstop="http://www.fstopapp.com/xmp/"
|
||||||
|
fstop:favorite="0">
|
||||||
|
<dc:subject>
|
||||||
|
<rdf:Bag>
|
||||||
|
<rdf:li>first</rdf:li>
|
||||||
|
<rdf:li>second</rdf:li>
|
||||||
|
</rdf:Bag>
|
||||||
|
</dc:subject>
|
||||||
|
</rdf:Description>
|
||||||
|
</rdf:RDF>
|
||||||
|
</x:xmpmeta>
|
||||||
|
<?xpacket end="w"?>
|
BIN
test/backend/assets/sidecar/no_metadata_v3.jpg
Normal file
BIN
test/backend/assets/sidecar/no_metadata_v3.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
11
test/backend/assets/sidecar/no_metadata_v3.jpg.json
Normal file
11
test/backend/assets/sidecar/no_metadata_v3.jpg.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"size": {
|
||||||
|
"width": 10,
|
||||||
|
"height": 5
|
||||||
|
},
|
||||||
|
"creationDate": 1709057753000,
|
||||||
|
"fileSize": 1430,
|
||||||
|
"keywords": [
|
||||||
|
"first"
|
||||||
|
]
|
||||||
|
}
|
16
test/backend/assets/sidecar/no_metadata_v3.xmp
Normal file
16
test/backend/assets/sidecar/no_metadata_v3.xmp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
|
||||||
|
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
|
||||||
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||||
|
<rdf:Description rdf:about=""
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:fstop="http://www.fstopapp.com/xmp/"
|
||||||
|
fstop:favorite="0">
|
||||||
|
<dc:subject>
|
||||||
|
<rdf:Bag>
|
||||||
|
<rdf:li>first</rdf:li>
|
||||||
|
</rdf:Bag>
|
||||||
|
</dc:subject>
|
||||||
|
</rdf:Description>
|
||||||
|
</rdf:RDF>
|
||||||
|
</x:xmpmeta>
|
||||||
|
<?xpacket end="w"?>
|
@ -69,6 +69,55 @@ describe('MetadataLoader', () => {
|
|||||||
expect(Utils.clone(data)).to.be.deep.equal(expected);
|
expect(Utils.clone(data)).to.be.deep.equal(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should load sidecar file with file extension for video', async () => {
|
||||||
|
const data = await MetadataLoader.loadVideoMetadata(path.join(__dirname, '/../../../assets/sidecar/bunny_1sec.mp4'));
|
||||||
|
const expected = require(path.join(__dirname, '/../../../assets/sidecar/bunny_1sec.mp4.json'));
|
||||||
|
expect(Utils.clone(data)).to.be.deep.equal(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should load sidecar file without file extension for video', async () => {
|
||||||
|
const data = await MetadataLoader.loadVideoMetadata(path.join(__dirname, '/../../../assets/sidecar/bunny_1sec_v2.mp4'));
|
||||||
|
const expected = require(path.join(__dirname, '/../../../assets/sidecar/bunny_1sec.mp4.json'));//sidecar "bunny_1sec_v2.xmp" is identical to "bunny_1sec.mp4.xmp" so we expect the same result
|
||||||
|
expect(Utils.clone(data)).to.be.deep.equal(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should retrieve both keywords from sidecar file for video', async () => {
|
||||||
|
const data = await MetadataLoader.loadVideoMetadata(path.join(__dirname, '/../../../assets/sidecar/bunny_1sec.mp4'));
|
||||||
|
const expected = require(path.join(__dirname, '/../../../assets/sidecar/bunny_1sec.mp4.json'));
|
||||||
|
expect(Utils.clone(data)).to.be.deep.equal(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should retrieve one keyword from sidecar file for video', async () => {
|
||||||
|
const data = await MetadataLoader.loadVideoMetadata(path.join(__dirname, '/../../../assets/sidecar/bunny_1sec_v3.mp4'));
|
||||||
|
const expected = require(path.join(__dirname, '/../../../assets/sidecar/bunny_1sec_v3.mp4.json'));
|
||||||
|
expect(Utils.clone(data)).to.be.deep.equal(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should load sidecar file with file extension for photo', async () => {
|
||||||
|
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/sidecar/no_metadata.jpg'));
|
||||||
|
const expected = require(path.join(__dirname, '/../../../assets/sidecar/no_metadata.jpg.json'));
|
||||||
|
expect(Utils.clone(data)).to.be.deep.equal(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should load sidecar file without file extension for photo', async () => {
|
||||||
|
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/sidecar/no_metadata_v2.jpg'));
|
||||||
|
const expected = require(path.join(__dirname, '/../../../assets/sidecar/no_metadata.jpg.json'));//sidecar "no_metadata_v2.xmp" is identical to "no_metadata.jpg.xmp" so we expect the same result
|
||||||
|
expect(Utils.clone(data)).to.be.deep.equal(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should retrieve both keywords from sidecar file for photo', async () => {
|
||||||
|
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/sidecar/no_metadata.jpg'));
|
||||||
|
const expected = require(path.join(__dirname, '/../../../assets/sidecar/no_metadata.jpg.json'));
|
||||||
|
expect(Utils.clone(data)).to.be.deep.equal(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should retrieve one keyword from sidecar file for photo', async () => {
|
||||||
|
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/sidecar/no_metadata_v3.jpg'));
|
||||||
|
const expected = require(path.join(__dirname, '/../../../assets/sidecar/no_metadata_v3.jpg.json'));
|
||||||
|
expect(Utils.clone(data)).to.be.deep.equal(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
describe('should load jpg with proper height and orientation', () => {
|
describe('should load jpg with proper height and orientation', () => {
|
||||||
it('jpg 1', async () => {
|
it('jpg 1', async () => {
|
||||||
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/orientation/broken_orientation_exif.jpg'));
|
const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/orientation/broken_orientation_exif.jpg'));
|
||||||
|
Loading…
Reference in New Issue
Block a user