Skip to content

Commit

Permalink
Merge pull request #1 from grasdk/feature/kagahd_issue838
Browse files Browse the repository at this point in the history
Added read of CreationDate to sidecar and fixed tests
  • Loading branch information
kagahd authored Mar 12, 2024
2 parents a2fc613 + 390e24a commit f356eae
Show file tree
Hide file tree
Showing 11 changed files with 705 additions and 682 deletions.
1,329 changes: 666 additions & 663 deletions src/backend/model/fileaccess/MetadataLoader.ts

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/common/entities/MediaDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export interface SideCarDc {

export interface SideCarXmp {
Rating?: RatingTypes;
CreateDate?: string;
}

export const MediaDTOUtils = {
Expand Down
Binary file modified test/backend/assets/sidecar/metadata.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions test/backend/assets/sidecar/metadata.jpg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"width": 10,
"height": 5
},
"creationDate": 1710142352337,
"fileSize": 4489,
"creationDate": 1710188754000,
"fileSize": 5095,
"keywords": [
"floor",
"book"
Expand Down
Binary file added test/backend/assets/sidecar/metadata.jpg_original
Binary file not shown.
2 changes: 1 addition & 1 deletion test/backend/assets/sidecar/no_metadata.jpg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"width": 10,
"height": 5
},
"creationDate": 1710142352343,
"creationDate": 1542482851000,
"fileSize": 1430,
"keywords": [
"first",
Expand Down
35 changes: 21 additions & 14 deletions test/backend/assets/sidecar/no_metadata.jpg.xmp
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
<?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>
<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: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>
</x:xmpmeta>
<?xpacket end="w"?>
<?xpacket end="w"?>
2 changes: 1 addition & 1 deletion test/backend/assets/sidecar/no_metadata_v2.jpg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"width": 10,
"height": 5
},
"creationDate": 1710142352347,
"creationDate": 1542482851000,
"fileSize": 1430,
"keywords": [
"first",
Expand Down
6 changes: 6 additions & 0 deletions test/backend/assets/sidecar/no_metadata_v2.xmp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
</rdf:Bag>
</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:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
2 changes: 1 addition & 1 deletion test/backend/assets/sidecar/no_metadata_v3.jpg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"width": 10,
"height": 5
},
"creationDate": 1710142352352,
"creationDate": 1542482851000,
"fileSize": 1430,
"keywords": [
"first"
Expand Down
6 changes: 6 additions & 0 deletions test/backend/assets/sidecar/no_metadata_v3.xmp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
</rdf:Bag>
</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:RDF>
</x:xmpmeta>
<?xpacket end="w"?>

0 comments on commit f356eae

Please sign in to comment.