Skip to content

Commit f356eae

Browse files
authored
Merge pull request #1 from grasdk/feature/kagahd_issue838
Added read of CreationDate to sidecar and fixed tests
2 parents a2fc613 + 390e24a commit f356eae

File tree

11 files changed

+705
-682
lines changed

11 files changed

+705
-682
lines changed

src/backend/model/fileaccess/MetadataLoader.ts

Lines changed: 666 additions & 663 deletions
Large diffs are not rendered by default.

src/common/entities/MediaDTO.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export interface SideCarDc {
4040

4141
export interface SideCarXmp {
4242
Rating?: RatingTypes;
43+
CreateDate?: string;
4344
}
4445

4546
export const MediaDTOUtils = {
606 Bytes
Loading

test/backend/assets/sidecar/metadata.jpg.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"width": 10,
44
"height": 5
55
},
6-
"creationDate": 1710142352337,
7-
"fileSize": 4489,
6+
"creationDate": 1710188754000,
7+
"fileSize": 5095,
88
"keywords": [
99
"floor",
1010
"book"
4.38 KB
Binary file not shown.

test/backend/assets/sidecar/no_metadata.jpg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"width": 10,
44
"height": 5
55
},
6-
"creationDate": 1710142352343,
6+
"creationDate": 1542482851000,
77
"fileSize": 1430,
88
"keywords": [
99
"first",
Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
22
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
3-
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
4-
<rdf:Description rdf:about=""
5-
xmlns:dc="http://purl.org/dc/elements/1.1/"
6-
xmlns:fstop="http://www.fstopapp.com/xmp/"
7-
fstop:favorite="0">
8-
<dc:subject>
9-
<rdf:Bag>
10-
<rdf:li>first</rdf:li>
11-
<rdf:li>second</rdf:li>
12-
</rdf:Bag>
13-
</dc:subject>
14-
</rdf:Description>
15-
</rdf:RDF>
3+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
4+
<rdf:Description rdf:about=""
5+
xmlns:dc="http://purl.org/dc/elements/1.1/"
6+
xmlns:fstop="http://www.fstopapp.com/xmp/"
7+
fstop:favorite="0">
8+
<dc:subject>
9+
<rdf:Bag>
10+
<rdf:li>first</rdf:li>
11+
<rdf:li>second</rdf:li>
12+
</rdf:Bag>
13+
</dc:subject>
14+
</rdf:Description>
15+
16+
<rdf:Description rdf:about=''
17+
xmlns:xmp='http://ns.adobe.com/xap/1.0/'>
18+
<xmp:CreateDate>2018-11-17T20:27:31+01:00</xmp:CreateDate>
19+
<xmp:MetadataDate>2018-11-17T20:27:31+01:00</xmp:MetadataDate>
20+
<xmp:ModifyDate>2018-11-17T20:27:31+01:00</xmp:ModifyDate>
21+
</rdf:Description>
22+
</rdf:RDF>
1623
</x:xmpmeta>
17-
<?xpacket end="w"?>
24+
<?xpacket end="w"?>

test/backend/assets/sidecar/no_metadata_v2.jpg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"width": 10,
44
"height": 5
55
},
6-
"creationDate": 1710142352347,
6+
"creationDate": 1542482851000,
77
"fileSize": 1430,
88
"keywords": [
99
"first",

test/backend/assets/sidecar/no_metadata_v2.xmp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
</rdf:Bag>
1313
</dc:subject>
1414
</rdf:Description>
15+
<rdf:Description rdf:about=''
16+
xmlns:xmp='http://ns.adobe.com/xap/1.0/'>
17+
<xmp:CreateDate>2018-11-17T20:27:31+01:00</xmp:CreateDate>
18+
<xmp:MetadataDate>2018-11-17T20:27:31+01:00</xmp:MetadataDate>
19+
<xmp:ModifyDate>2018-11-17T20:27:31+01:00</xmp:ModifyDate>
20+
</rdf:Description>
1521
</rdf:RDF>
1622
</x:xmpmeta>
1723
<?xpacket end="w"?>

test/backend/assets/sidecar/no_metadata_v3.jpg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"width": 10,
44
"height": 5
55
},
6-
"creationDate": 1710142352352,
6+
"creationDate": 1542482851000,
77
"fileSize": 1430,
88
"keywords": [
99
"first"

0 commit comments

Comments
 (0)