Fixed sidecar collisions, closes #210

This commit is contained in:
Rhet Turnbull
2020-08-31 06:30:44 -07:00
parent 1f343c1c11
commit c2fecc9d30
6 changed files with 98 additions and 29 deletions

View File

@@ -418,7 +418,7 @@ def test_xmp_sidecar():
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
<photoshop:SidecarForExtension>JPG</photoshop:SidecarForExtension>
<photoshop:SidecarForExtension>jpg</photoshop:SidecarForExtension>
<dc:description>Girls with pumpkins</dc:description>
<dc:title>Can we carry this?</dc:title>
<!-- keywords and persons listed in <dc:subject> as Photos does -->
@@ -461,7 +461,7 @@ def test_xmp_sidecar():
xmp_expected_lines = [line.strip() for line in xmp_expected.split("\n")]
xmp_got = photos[0]._xmp_sidecar()
xmp_got = photos[0]._xmp_sidecar(extension="jpg")
xmp_got_lines = [line.strip() for line in xmp_got.split("\n")]
for line_expected, line_got in zip(xmp_expected_lines, xmp_got_lines):
@@ -481,7 +481,7 @@ def test_xmp_sidecar_keyword_template():
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
<photoshop:SidecarForExtension>JPG</photoshop:SidecarForExtension>
<photoshop:SidecarForExtension>jpg</photoshop:SidecarForExtension>
<dc:description>Girls with pumpkins</dc:description>
<dc:title>Can we carry this?</dc:title>
<!-- keywords and persons listed in <dc:subject> as Photos does -->
@@ -528,7 +528,7 @@ def test_xmp_sidecar_keyword_template():
xmp_expected_lines = [line.strip() for line in xmp_expected.split("\n")]
xmp_got = photos[0]._xmp_sidecar(
keyword_template=["{folder_album}", "{created.year}"]
keyword_template=["{folder_album}", "{created.year}"], extension="jpg"
)
xmp_got_lines = [line.strip() for line in xmp_got.split("\n")]