Ensure keyword list only contains string
This commit ensures that every keyword in the keyword list that is to be written to a sidecar or exif only contains strings. The current implementation fails with an exception as the "sorted" functions will fail if the list contains a mix of strings and integers.
This commit is contained in:
@@ -1443,7 +1443,7 @@ def _exiftool_dict(
|
||||
|
||||
if keyword_list:
|
||||
# remove duplicates
|
||||
keyword_list = sorted(list(set(keyword_list)))
|
||||
keyword_list = sorted(list(set([str(keyword) for keyword in keyword_list])))
|
||||
exif["IPTC:Keywords"] = keyword_list.copy()
|
||||
exif["XMP:Subject"] = keyword_list.copy()
|
||||
exif["XMP:TagsList"] = keyword_list.copy()
|
||||
|
||||
Reference in New Issue
Block a user