1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-04-23 12:18:59 +02:00

Added read of CreationDate to sidecar and fixed tests

This commit is contained in:
grasdk 2024-03-11 23:47:44 +01:00
parent a2fc61320d
commit 390e24a2c4
11 changed files with 705 additions and 682 deletions

View File

@ -640,6 +640,9 @@ export class MetadataLoader {
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;
} }
if ((sidecarData as SideCar).xmp.CreateDate) {
metadata.creationDate = timestampToMS((sidecarData as SideCar).xmp.CreateDate, null);
}
} }
} }
} }

View File

@ -40,6 +40,7 @@ export interface SideCarDc {
export interface SideCarXmp { export interface SideCarXmp {
Rating?: RatingTypes; Rating?: RatingTypes;
CreateDate?: string;
} }
export const MediaDTOUtils = { export const MediaDTOUtils = {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -3,8 +3,8 @@
"width": 10, "width": 10,
"height": 5 "height": 5
}, },
"creationDate": 1710142352337, "creationDate": 1710188754000,
"fileSize": 4489, "fileSize": 5095,
"keywords": [ "keywords": [
"floor", "floor",
"book" "book"

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -3,7 +3,7 @@
"width": 10, "width": 10,
"height": 5 "height": 5
}, },
"creationDate": 1710142352343, "creationDate": 1542482851000,
"fileSize": 1430, "fileSize": 1430,
"keywords": [ "keywords": [
"first", "first",

View File

@ -12,6 +12,13 @@
</rdf:Bag> </rdf:Bag>
</dc:subject> </dc:subject>
</rdf:Description> </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>
</rdf:Description>
</rdf:RDF> </rdf:RDF>
</x:xmpmeta> </x:xmpmeta>
<?xpacket end="w"?> <?xpacket end="w"?>

View File

@ -3,7 +3,7 @@
"width": 10, "width": 10,
"height": 5 "height": 5
}, },
"creationDate": 1710142352347, "creationDate": 1542482851000,
"fileSize": 1430, "fileSize": 1430,
"keywords": [ "keywords": [
"first", "first",

View File

@ -11,6 +11,12 @@
<rdf:li>second</rdf:li> <rdf:li>second</rdf:li>
</rdf:Bag> </rdf:Bag>
</dc:subject> </dc:subject>
</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>
</rdf:Description> </rdf:Description>
</rdf:RDF> </rdf:RDF>
</x:xmpmeta> </x:xmpmeta>

View File

@ -3,7 +3,7 @@
"width": 10, "width": 10,
"height": 5 "height": 5
}, },
"creationDate": 1710142352352, "creationDate": 1542482851000,
"fileSize": 1430, "fileSize": 1430,
"keywords": [ "keywords": [
"first" "first"

View File

@ -10,6 +10,12 @@
<rdf:li>first</rdf:li> <rdf:li>first</rdf:li>
</rdf:Bag> </rdf:Bag>
</dc:subject> </dc:subject>
</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>
</rdf:Description> </rdf:Description>
</rdf:RDF> </rdf:RDF>
</x:xmpmeta> </x:xmpmeta>