diff --git a/osxphotos/_version.py b/osxphotos/_version.py
index 26d4202e..57551021 100644
--- a/osxphotos/_version.py
+++ b/osxphotos/_version.py
@@ -1,3 +1,3 @@
""" version info """
-__version__ = "0.41.1"
+__version__ = "0.41.2"
diff --git a/osxphotos/exiftool.py b/osxphotos/exiftool.py
index b076e617..ad3dab5d 100644
--- a/osxphotos/exiftool.py
+++ b/osxphotos/exiftool.py
@@ -176,6 +176,10 @@ class ExifTool:
command = [f"-{tag}={value}"]
if self.overwrite and not self._context_mgr:
command.append("-overwrite_original")
+
+ # avoid "Warning: Some character(s) could not be encoded in Latin" warning
+ command.append("-iptc:codedcharacterset=utf8")
+
if self._context_mgr:
self._commands.extend(command)
return True
diff --git a/osxphotos/photoinfo/_photoinfo_export.py b/osxphotos/photoinfo/_photoinfo_export.py
index 7fcf3c56..464afa98 100644
--- a/osxphotos/photoinfo/_photoinfo_export.py
+++ b/osxphotos/photoinfo/_photoinfo_export.py
@@ -949,7 +949,7 @@ def export2(
filename=dest.name,
persons=persons,
location=location,
- replace_keywords=replace_keywords
+ replace_keywords=replace_keywords,
)
sidecars.append(
(
@@ -975,7 +975,7 @@ def export2(
filename=dest.name,
persons=persons,
location=location,
- replace_keywords=replace_keywords
+ replace_keywords=replace_keywords,
)
sidecars.append(
(
@@ -997,7 +997,7 @@ def export2(
extension=dest.suffix[1:] if dest.suffix else None,
persons=persons,
location=location,
- replace_keywords=replace_keywords
+ replace_keywords=replace_keywords,
)
sidecars.append(
(
@@ -1067,7 +1067,7 @@ def export2(
merge_exif_persons=merge_exif_persons,
persons=persons,
location=location,
- replace_keywords=replace_keywords
+ replace_keywords=replace_keywords,
)
)[0]
if old_data != current_data:
@@ -1090,7 +1090,7 @@ def export2(
merge_exif_persons=merge_exif_persons,
persons=persons,
location=location,
- replace_keywords=replace_keywords
+ replace_keywords=replace_keywords,
)
if warning_:
all_results.exiftool_warning.append((exported_file, warning_))
@@ -1110,7 +1110,7 @@ def export2(
merge_exif_persons=merge_exif_persons,
persons=persons,
location=location,
- replace_keywords=replace_keywords
+ replace_keywords=replace_keywords,
),
)
export_db.set_stat_exif_for_file(
@@ -1135,7 +1135,7 @@ def export2(
merge_exif_persons=merge_exif_persons,
persons=persons,
location=location,
- replace_keywords=replace_keywords
+ replace_keywords=replace_keywords,
)
if warning_:
all_results.exiftool_warning.append((exported_file, warning_))
@@ -1155,7 +1155,7 @@ def export2(
merge_exif_persons=merge_exif_persons,
persons=persons,
location=location,
- replace_keywords=replace_keywords
+ replace_keywords=replace_keywords,
),
)
export_db.set_stat_exif_for_file(
@@ -1646,6 +1646,13 @@ def _exiftool_dict(
exif["QuickTime:ModifyDate"] = datetime_tz_to_utc(
self.date_modified
).strftime("%Y:%m:%d %H:%M:%S")
+
+ # remove any new lines in any fields
+ for field, val in exif.items():
+ if type(val) == str:
+ exif[field] = val.replace("\n", " ")
+ elif type(val) == list:
+ exif[field] = [v.replace("\n", " ") for v in val]
return exif
diff --git a/tests/Test-10.15.6.photoslibrary/originals/D/D79B8D77-BFFC-460B-9312-034F2877D35B.jpeg b/tests/Test-10.15.6.photoslibrary/originals/D/D79B8D77-BFFC-460B-9312-034F2877D35B.jpeg
index f23a024a..3672a241 100644
Binary files a/tests/Test-10.15.6.photoslibrary/originals/D/D79B8D77-BFFC-460B-9312-034F2877D35B.jpeg and b/tests/Test-10.15.6.photoslibrary/originals/D/D79B8D77-BFFC-460B-9312-034F2877D35B.jpeg differ
diff --git a/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite b/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite
index 87846fe6..29813847 100644
Binary files a/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite and b/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite differ
diff --git a/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite-shm b/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite-shm
index cd19c001..fdf41c0b 100644
Binary files a/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite-shm and b/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite-shm differ
diff --git a/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite-wal b/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite-wal
index 514d5d73..9b37d774 100644
Binary files a/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite-wal and b/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite-wal differ
diff --git a/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite.lock b/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite.lock
index 4c746646..77e64dc2 100644
--- a/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite.lock
+++ b/tests/Test-10.15.7.photoslibrary/database/Photos.sqlite.lock
@@ -7,7 +7,7 @@
hostuuid
9575E48B-8D5F-5654-ABAC-4431B1167324
pid
- 55247
+ 86501
processname
photolibraryd
uid
diff --git a/tests/Test-10.15.7.photoslibrary/database/search/psi.sqlite b/tests/Test-10.15.7.photoslibrary/database/search/psi.sqlite
index 4a974570..25e57263 100644
Binary files a/tests/Test-10.15.7.photoslibrary/database/search/psi.sqlite and b/tests/Test-10.15.7.photoslibrary/database/search/psi.sqlite differ
diff --git a/tests/Test-10.15.7.photoslibrary/database/search/synonymsProcess.plist b/tests/Test-10.15.7.photoslibrary/database/search/synonymsProcess.plist
index 9ab2085c..4505a20d 100644
Binary files a/tests/Test-10.15.7.photoslibrary/database/search/synonymsProcess.plist and b/tests/Test-10.15.7.photoslibrary/database/search/synonymsProcess.plist differ
diff --git a/tests/Test-10.15.7.photoslibrary/database/search/zeroKeywords.data b/tests/Test-10.15.7.photoslibrary/database/search/zeroKeywords.data
index 5d03620c..e085c2bf 100644
Binary files a/tests/Test-10.15.7.photoslibrary/database/search/zeroKeywords.data and b/tests/Test-10.15.7.photoslibrary/database/search/zeroKeywords.data differ
diff --git a/tests/Test-10.15.7.photoslibrary/originals/1/1EB2B765-0765-43BA-A90C-0D0580E6172C.jpeg b/tests/Test-10.15.7.photoslibrary/originals/1/1EB2B765-0765-43BA-A90C-0D0580E6172C.jpeg
index 7d8415cc..3b39a563 100644
Binary files a/tests/Test-10.15.7.photoslibrary/originals/1/1EB2B765-0765-43BA-A90C-0D0580E6172C.jpeg and b/tests/Test-10.15.7.photoslibrary/originals/1/1EB2B765-0765-43BA-A90C-0D0580E6172C.jpeg differ
diff --git a/tests/Test-10.15.7.photoslibrary/originals/7/7F74DD34-5920-4DA3-B284-479887A34F66.jpeg b/tests/Test-10.15.7.photoslibrary/originals/7/7F74DD34-5920-4DA3-B284-479887A34F66.jpeg
new file mode 100644
index 00000000..80046461
Binary files /dev/null and b/tests/Test-10.15.7.photoslibrary/originals/7/7F74DD34-5920-4DA3-B284-479887A34F66.jpeg differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm
index 470583de..aa0acb8e 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-wal b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-wal
index 396aafcb..347660e2 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-wal and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-wal differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm
index 67c45890..dce4bde4 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-wal b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-wal
index 714e6fa5..a631b0e6 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-wal and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-wal differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm
index 587fe75a..7c25708e 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal
index d07a0a36..65d902cc 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm
index dbbe086d..add0650f 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-wal b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-wal
index 3509622b..28e9ff15 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-wal and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-wal differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-shm b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-shm
index 6b157f88..d8b52de6 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-shm and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-shm differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-wal b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-wal
index 9865ff5b..1fb7182f 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-wal and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSLocationCache.sqlite-wal differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-shm b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-shm
index 591ba328..0b28d11c 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-shm and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-shm differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-wal b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-wal
index c0fbc8f1..61ab067e 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-wal and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-wal differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm
index 0c057888..5549875a 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal
index c57856bb..fa652c3a 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSearchComputationCache.plist b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSearchComputationCache.plist
index 34c963ba..cce158dc 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSearchComputationCache.plist and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSearchComputationCache.plist differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotoAnalysisServicePreferences.plist b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotoAnalysisServicePreferences.plist
index 0c8b569e..e6eae6e6 100644
--- a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotoAnalysisServicePreferences.plist
+++ b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotoAnalysisServicePreferences.plist
@@ -3,24 +3,24 @@
BackgroundHighlightCollection
- 2020-12-16T05:41:43Z
+ 2021-03-13T16:38:25Z
BackgroundHighlightEnrichment
- 2020-12-16T05:41:42Z
+ 2021-03-13T16:38:24Z
BackgroundJobAssetRevGeocode
- 2020-12-16T05:41:43Z
+ 2021-03-13T16:38:25Z
BackgroundJobSearch
- 2020-12-16T05:41:43Z
+ 2021-03-13T16:38:25Z
BackgroundPeopleSuggestion
- 2020-12-16T05:41:41Z
+ 2021-03-13T16:38:23Z
BackgroundUserBehaviorProcessor
- 2020-12-16T05:41:43Z
+ 2021-03-13T16:38:25Z
PhotoAnalysisGraphLastBackgroundGraphConsistencyUpdateJobDateKey
2020-10-17T23:45:33Z
PhotoAnalysisGraphLastBackgroundGraphRebuildJobDate
2020-10-17T23:45:24Z
PhotoAnalysisGraphLastBackgroundMemoryGenerationJobDate
- 2020-12-16T05:41:44Z
+ 2021-03-13T16:38:25Z
SiriPortraitDonation
- 2020-12-16T05:41:43Z
+ 2021-03-13T16:38:25Z
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb
index 998acab3..e9a3ae95 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-shm b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-shm
index fe9ac284..b3ad0193 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-shm and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-shm differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-wal b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-wal
index e69de29b..6abe2691 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-wal and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-wal differ
diff --git a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist
index 9348bd5c..2bfaa0d0 100644
Binary files a/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist and b/tests/Test-10.15.7.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist differ
diff --git a/tests/Test-10.15.7.photoslibrary/resources/derivatives/7/7F74DD34-5920-4DA3-B284-479887A34F66_1_105_c.jpeg b/tests/Test-10.15.7.photoslibrary/resources/derivatives/7/7F74DD34-5920-4DA3-B284-479887A34F66_1_105_c.jpeg
new file mode 100644
index 00000000..46f2e70f
Binary files /dev/null and b/tests/Test-10.15.7.photoslibrary/resources/derivatives/7/7F74DD34-5920-4DA3-B284-479887A34F66_1_105_c.jpeg differ
diff --git a/tests/Test-10.15.7.photoslibrary/resources/derivatives/masters/7/7F74DD34-5920-4DA3-B284-479887A34F66_4_5005_c.jpeg b/tests/Test-10.15.7.photoslibrary/resources/derivatives/masters/7/7F74DD34-5920-4DA3-B284-479887A34F66_4_5005_c.jpeg
new file mode 100644
index 00000000..19f32d45
Binary files /dev/null and b/tests/Test-10.15.7.photoslibrary/resources/derivatives/masters/7/7F74DD34-5920-4DA3-B284-479887A34F66_4_5005_c.jpeg differ
diff --git a/tests/Test-10.15.7.photoslibrary/resources/derivatives/thumbs/3305.ithmb b/tests/Test-10.15.7.photoslibrary/resources/derivatives/thumbs/3305.ithmb
index a31a03c1..5e07e6ae 100644
Binary files a/tests/Test-10.15.7.photoslibrary/resources/derivatives/thumbs/3305.ithmb and b/tests/Test-10.15.7.photoslibrary/resources/derivatives/thumbs/3305.ithmb differ
diff --git a/tests/Test-10.15.7.photoslibrary/resources/derivatives/thumbs/4031.ithmb b/tests/Test-10.15.7.photoslibrary/resources/derivatives/thumbs/4031.ithmb
index 6b6cd711..bed4a282 100644
Binary files a/tests/Test-10.15.7.photoslibrary/resources/derivatives/thumbs/4031.ithmb and b/tests/Test-10.15.7.photoslibrary/resources/derivatives/thumbs/4031.ithmb differ
diff --git a/tests/Test-10.15.7.photoslibrary/resources/derivatives/thumbs/4132.ithmb b/tests/Test-10.15.7.photoslibrary/resources/derivatives/thumbs/4132.ithmb
index bb6dd6a4..9db6a20b 100644
Binary files a/tests/Test-10.15.7.photoslibrary/resources/derivatives/thumbs/4132.ithmb and b/tests/Test-10.15.7.photoslibrary/resources/derivatives/thumbs/4132.ithmb differ
diff --git a/tests/Test-10.15.7.photoslibrary/resources/journals/Asset-change.plj b/tests/Test-10.15.7.photoslibrary/resources/journals/Asset-change.plj
index 2906c9f0..c0937fc2 100644
Binary files a/tests/Test-10.15.7.photoslibrary/resources/journals/Asset-change.plj and b/tests/Test-10.15.7.photoslibrary/resources/journals/Asset-change.plj differ
diff --git a/tests/Test-10.15.7.photoslibrary/resources/journals/HistoryToken.plist b/tests/Test-10.15.7.photoslibrary/resources/journals/HistoryToken.plist
index 93c0060d..b3044e64 100644
Binary files a/tests/Test-10.15.7.photoslibrary/resources/journals/HistoryToken.plist and b/tests/Test-10.15.7.photoslibrary/resources/journals/HistoryToken.plist differ
diff --git a/tests/Test-10.15.7.photoslibrary/resources/journals/ImportSession-change.plj b/tests/Test-10.15.7.photoslibrary/resources/journals/ImportSession-change.plj
index 9771db5e..f9a32321 100644
Binary files a/tests/Test-10.15.7.photoslibrary/resources/journals/ImportSession-change.plj and b/tests/Test-10.15.7.photoslibrary/resources/journals/ImportSession-change.plj differ
diff --git a/tests/Test-10.15.7.photoslibrary/resources/journals/Keyword-change.plj b/tests/Test-10.15.7.photoslibrary/resources/journals/Keyword-change.plj
index d90cabbf..414f52e4 100644
Binary files a/tests/Test-10.15.7.photoslibrary/resources/journals/Keyword-change.plj and b/tests/Test-10.15.7.photoslibrary/resources/journals/Keyword-change.plj differ
diff --git a/tests/search_info_test_data_10_15_7.json b/tests/search_info_test_data_10_15_7.json
index ea109ef2..291a2b7a 100644
--- a/tests/search_info_test_data_10_15_7.json
+++ b/tests/search_info_test_data_10_15_7.json
@@ -1 +1 @@
-{"UUID_SEARCH_INFO": {"C8EAF50A-D891-4E0C-8086-C417E1284153": {"labels": ["Food", "Butter"], "place_names": ["Durham Bulls Athletic Park"], "streets": ["Blackwell St"], "neighborhoods": ["American Tobacco District", "Downtown Durham"], "city": "Durham", "locality_names": ["Durham"], "state": "North Carolina", "state_abbreviation": "NC", "country": "United States", "bodies_of_water": [], "month": "October", "year": "2018", "holidays": [], "activities": ["Entertainment", "Travel", "Dining", "Dinner", "Trip"], "season": "Fall", "venues": ["Luna Rotisserie and Empanadas", "The Pinhook", "Pie Pushers", "Copa"], "venue_types": [], "media_types": []}, "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": {"labels": ["Sunset Sunrise", "Sky", "Desert", "Land", "Outdoor"], "place_names": ["Royal Palms State Beach"], "streets": [], "neighborhoods": ["San Pedro"], "city": "Los Angeles", "locality_names": [], "state": "California", "state_abbreviation": "", "country": "United States", "bodies_of_water": ["Catalina Channel"], "month": "November", "year": "2017", "holidays": [], "activities": ["Beach Activity", "Activity"], "season": "Fall", "venues": [], "venue_types": [], "media_types": ["Live Photos"]}, "2C151013-5BBA-4D00-B70F-1C9420418B86": {"labels": ["Land", "Forest", "Water Body", "Furniture", "Bench", "Water", "People", "Plant", "Outdoor", "Vegetation"], "place_names": [], "streets": [], "neighborhoods": [], "city": "", "locality_names": [], "state": "", "state_abbreviation": "", "country": "", "bodies_of_water": [], "month": "December", "year": "2014", "holidays": ["Christmas Day"], "activities": ["Celebration", "Holiday"], "season": "Winter", "venues": [], "venue_types": [], "media_types": []}}, "UUID_SEARCH_INFO_NORMALIZED": {"C8EAF50A-D891-4E0C-8086-C417E1284153": {"labels": ["food", "butter"], "place_names": ["durham bulls athletic park"], "streets": ["blackwell st"], "neighborhoods": ["american tobacco district", "downtown durham"], "city": "durham", "locality_names": ["durham"], "state": "north carolina", "state_abbreviation": "nc", "country": "united states", "bodies_of_water": [], "month": "october", "year": "2018", "holidays": [], "activities": ["entertainment", "travel", "dining", "dinner", "trip"], "season": "fall", "venues": ["luna rotisserie and empanadas", "the pinhook", "pie pushers", "copa"], "venue_types": [], "media_types": []}, "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": {"labels": ["sunset sunrise", "sky", "desert", "land", "outdoor"], "place_names": ["royal palms state beach"], "streets": [], "neighborhoods": ["san pedro"], "city": "los angeles", "locality_names": [], "state": "california", "state_abbreviation": "", "country": "united states", "bodies_of_water": ["catalina channel"], "month": "november", "year": "2017", "holidays": [], "activities": ["beach activity", "activity"], "season": "fall", "venues": [], "venue_types": [], "media_types": ["live photos"]}, "2C151013-5BBA-4D00-B70F-1C9420418B86": {"labels": ["land", "forest", "water body", "furniture", "bench", "water", "people", "plant", "outdoor", "vegetation"], "place_names": [], "streets": [], "neighborhoods": [], "city": "", "locality_names": [], "state": "", "state_abbreviation": "", "country": "", "bodies_of_water": [], "month": "december", "year": "2014", "holidays": ["christmas day"], "activities": ["celebration", "holiday"], "season": "winter", "venues": [], "venue_types": [], "media_types": []}}, "UUID_SEARCH_INFO_ALL": {"C8EAF50A-D891-4E0C-8086-C417E1284153": ["Food", "Butter", "Durham Bulls Athletic Park", "Blackwell St", "American Tobacco District", "Downtown Durham", "Durham", "Entertainment", "Travel", "Dining", "Dinner", "Trip", "Luna Rotisserie and Empanadas", "The Pinhook", "Pie Pushers", "Copa", "Durham", "North Carolina", "NC", "United States", "October", "2018", "Fall"], "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": ["Sunset Sunrise", "Sky", "Desert", "Land", "Outdoor", "Royal Palms State Beach", "San Pedro", "Catalina Channel", "Beach Activity", "Activity", "Live Photos", "Los Angeles", "California", "United States", "November", "2017", "Fall"], "2C151013-5BBA-4D00-B70F-1C9420418B86": ["Land", "Forest", "Water Body", "Furniture", "Bench", "Water", "People", "Plant", "Outdoor", "Vegetation", "Christmas Day", "Celebration", "Holiday", "December", "2014", "Winter"]}, "UUID_SEARCH_INFO_ALL_NORMALIZED": {"C8EAF50A-D891-4E0C-8086-C417E1284153": ["food", "butter", "durham bulls athletic park", "blackwell st", "american tobacco district", "downtown durham", "durham", "entertainment", "travel", "dining", "dinner", "trip", "luna rotisserie and empanadas", "the pinhook", "pie pushers", "copa", "durham", "north carolina", "nc", "united states", "october", "2018", "fall"], "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": ["sunset sunrise", "sky", "desert", "land", "outdoor", "royal palms state beach", "san pedro", "catalina channel", "beach activity", "activity", "live photos", "los angeles", "california", "united states", "november", "2017", "fall"], "2C151013-5BBA-4D00-B70F-1C9420418B86": ["land", "forest", "water body", "furniture", "bench", "water", "people", "plant", "outdoor", "vegetation", "christmas day", "celebration", "holiday", "december", "2014", "winter"]}}
+{"UUID_SEARCH_INFO": {"C8EAF50A-D891-4E0C-8086-C417E1284153": {"labels": ["Food", "Butter"], "place_names": ["Durham Bulls Athletic Park"], "streets": ["Blackwell St"], "neighborhoods": ["American Tobacco District", "Downtown Durham"], "city": "Durham", "locality_names": ["Durham"], "state": "North Carolina", "state_abbreviation": "NC", "country": "United States", "bodies_of_water": [], "month": "October", "year": "2018", "holidays": [], "activities": ["Entertainment", "Travel", "Dining", "Dinner", "Trip"], "season": "Fall", "venues": ["Luna Rotisserie and Empanadas", "Copa", "The Pinhook", "Pie Pushers"], "venue_types": [], "media_types": []}, "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": {"labels": ["Desert", "Land", "Outdoor", "Sky", "Sunset Sunrise"], "place_names": ["Royal Palms State Beach"], "streets": [], "neighborhoods": ["San Pedro"], "city": "Los Angeles", "locality_names": [], "state": "California", "state_abbreviation": "", "country": "United States", "bodies_of_water": ["Catalina Channel"], "month": "November", "year": "2017", "holidays": [], "activities": ["Beach Activity", "Activity"], "season": "Fall", "venues": [], "venue_types": [], "media_types": ["Live Photos"]}, "2C151013-5BBA-4D00-B70F-1C9420418B86": {"labels": ["Forest", "People", "Vegetation", "Outdoor", "Land", "Water", "Water Body", "Furniture", "Bench"], "place_names": [], "streets": [], "neighborhoods": [], "city": "", "locality_names": [], "state": "", "state_abbreviation": "", "country": "", "bodies_of_water": [], "month": "December", "year": "2014", "holidays": ["Christmas Day"], "activities": ["Celebration", "Holiday"], "season": "Winter", "venues": [], "venue_types": [], "media_types": []}}, "UUID_SEARCH_INFO_NORMALIZED": {"C8EAF50A-D891-4E0C-8086-C417E1284153": {"labels": ["food", "butter"], "place_names": ["durham bulls athletic park"], "streets": ["blackwell st"], "neighborhoods": ["american tobacco district", "downtown durham"], "city": "durham", "locality_names": ["durham"], "state": "north carolina", "state_abbreviation": "nc", "country": "united states", "bodies_of_water": [], "month": "october", "year": "2018", "holidays": [], "activities": ["entertainment", "travel", "dining", "dinner", "trip"], "season": "fall", "venues": ["luna rotisserie and empanadas", "copa", "the pinhook", "pie pushers"], "venue_types": [], "media_types": []}, "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": {"labels": ["desert", "land", "outdoor", "sky", "sunset sunrise"], "place_names": ["royal palms state beach"], "streets": [], "neighborhoods": ["san pedro"], "city": "los angeles", "locality_names": [], "state": "california", "state_abbreviation": "", "country": "united states", "bodies_of_water": ["catalina channel"], "month": "november", "year": "2017", "holidays": [], "activities": ["beach activity", "activity"], "season": "fall", "venues": [], "venue_types": [], "media_types": ["live photos"]}, "2C151013-5BBA-4D00-B70F-1C9420418B86": {"labels": ["forest", "people", "vegetation", "outdoor", "land", "water", "water body", "furniture", "bench"], "place_names": [], "streets": [], "neighborhoods": [], "city": "", "locality_names": [], "state": "", "state_abbreviation": "", "country": "", "bodies_of_water": [], "month": "december", "year": "2014", "holidays": ["christmas day"], "activities": ["celebration", "holiday"], "season": "winter", "venues": [], "venue_types": [], "media_types": []}}, "UUID_SEARCH_INFO_ALL": {"C8EAF50A-D891-4E0C-8086-C417E1284153": ["Food", "Butter", "Durham Bulls Athletic Park", "Blackwell St", "American Tobacco District", "Downtown Durham", "Durham", "Entertainment", "Travel", "Dining", "Dinner", "Trip", "Luna Rotisserie and Empanadas", "Copa", "The Pinhook", "Pie Pushers", "Durham", "North Carolina", "NC", "United States", "October", "2018", "Fall"], "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": ["Desert", "Land", "Outdoor", "Sky", "Sunset Sunrise", "Royal Palms State Beach", "San Pedro", "Catalina Channel", "Beach Activity", "Activity", "Live Photos", "Los Angeles", "California", "United States", "November", "2017", "Fall"], "2C151013-5BBA-4D00-B70F-1C9420418B86": ["Forest", "People", "Vegetation", "Outdoor", "Land", "Water", "Water Body", "Furniture", "Bench", "Christmas Day", "Celebration", "Holiday", "December", "2014", "Winter"]}, "UUID_SEARCH_INFO_ALL_NORMALIZED": {"C8EAF50A-D891-4E0C-8086-C417E1284153": ["food", "butter", "durham bulls athletic park", "blackwell st", "american tobacco district", "downtown durham", "durham", "entertainment", "travel", "dining", "dinner", "trip", "luna rotisserie and empanadas", "copa", "the pinhook", "pie pushers", "durham", "north carolina", "nc", "united states", "october", "2018", "fall"], "71DFB4C3-E868-4BE4-906E-D96BD8692D7E": ["desert", "land", "outdoor", "sky", "sunset sunrise", "royal palms state beach", "san pedro", "catalina channel", "beach activity", "activity", "live photos", "los angeles", "california", "united states", "november", "2017", "fall"], "2C151013-5BBA-4D00-B70F-1C9420418B86": ["forest", "people", "vegetation", "outdoor", "land", "water", "water body", "furniture", "bench", "christmas day", "celebration", "holiday", "december", "2014", "winter"]}}
diff --git a/tests/test_catalina_10_15_7.py b/tests/test_catalina_10_15_7.py
index 0573afde..97fe49fb 100644
--- a/tests/test_catalina_10_15_7.py
+++ b/tests/test_catalina_10_15_7.py
@@ -23,10 +23,10 @@ PHOTOS_DB = "tests/Test-10.15.7.photoslibrary/database/photos.db"
PHOTOS_DB_PATH = "/Test-10.15.7.photoslibrary/database/photos.db"
PHOTOS_LIBRARY_PATH = "/Test-10.15.7.photoslibrary"
-PHOTOS_DB_LEN = 19
-PHOTOS_NOT_IN_TRASH_LEN = 17
+PHOTOS_DB_LEN = 20
+PHOTOS_NOT_IN_TRASH_LEN = 18
PHOTOS_IN_TRASH_LEN = 2
-PHOTOS_DB_IMPORT_SESSIONS = 14
+PHOTOS_DB_IMPORT_SESSIONS = 15
KEYWORDS = [
"Kids",
@@ -41,6 +41,10 @@ KEYWORDS = [
"foo/bar",
"Travel",
"Maria",
+ "Drink",
+ "Val d'Isère",
+ "Wine",
+ "Wine Bottle",
]
# Photos 5 includes blank person for detected face
PERSONS = ["Katie", "Suzy", "Maria", _UNKNOWN_PERSON]
@@ -67,6 +71,10 @@ KEYWORDS_DICT = {
"foo/bar": 1,
"Travel": 2,
"Maria": 1,
+ "Drink": 1,
+ "Val d'Isère": 1,
+ "Wine": 1,
+ "Wine Bottle": 1,
}
PERSONS_DICT = {"Katie": 3, "Suzy": 2, "Maria": 2, _UNKNOWN_PERSON: 1}
ALBUM_DICT = {
@@ -102,6 +110,7 @@ UUID_DICT = {
"intrash_person_keywords": "6FD38366-3BF2-407D-81FE-7153EB6125B6",
"import_session": "8846E3E6-8AC8-4857-8448-E3D025784410",
"movie": "D1359D09-1373-4F3B-B0E3-1A4DE573E4A3",
+ "description_newlines": "7F74DD34-5920-4DA3-B284-479887A34F66",
}
UUID_DICT_LOCAL = {
@@ -1010,7 +1019,7 @@ def test_from_to_date(photosdb):
time.tzset()
photos = photosdb.photos(from_date=datetime.datetime(2018, 10, 28))
- assert len(photos) == 10
+ assert len(photos) == 11
photos = photosdb.photos(to_date=datetime.datetime(2018, 10, 28))
assert len(photos) == 7
@@ -1265,4 +1274,13 @@ def test_no_adjustments(photosdb):
""" test adjustments when photo has no adjusments"""
photo = photosdb.get_photo(UUID_DICT["no_adjustments"])
- assert photo.adjustments is None
\ No newline at end of file
+ assert photo.adjustments is None
+
+
+def test_exiftool_newlines_in_description(photosdb):
+ """ Test that exiftool code removes newlines embedded in description, issue #393"""
+
+ photo = photosdb.get_photo(UUID_DICT["description_newlines"])
+ exif = photo._exiftool_dict()
+ assert photo.description.find("\n") > 0
+ assert exif["EXIF:ImageDescription"].find("\n") == -1
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 87548409..cf099b77 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -611,6 +611,7 @@ UUID_NOT_IN_ALBUM = [
"6191423D-8DB8-4D4C-92BE-9BBBA308AAC4",
"35329C57-B963-48D6-BB75-6AFF9370CBBC",
"8846E3E6-8AC8-4857-8448-E3D025784410",
+ "7F74DD34-5920-4DA3-B284-479887A34F66",
]