Skip to content

Commit

Permalink
Fix for kMDItemKeywords as comma delimited string, #83
Browse files Browse the repository at this point in the history
  • Loading branch information
RhetTbull committed Nov 17, 2022
1 parent 719be3b commit c7ca9d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion osxmetadata/mditem.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def get_mditem_metadata(
# some attributes like kMDItemKeywords do not always follow the documented type
# and can return a single comma-delimited string instead of a list (See #83)
return (
str(value).split(",")
[x.strip() for x in str(value).split(",")]
if isinstance(value, (objc.pyobjc_unicode, str))
else [str(x) for x in value]
)
Expand Down

0 comments on commit c7ca9d0

Please sign in to comment.