Skip to content

Commit

Permalink
support exiftool for non-media files (fixes #419)
Browse files Browse the repository at this point in the history
  • Loading branch information
tfeldmann committed Nov 25, 2024
1 parent f6ad7e8 commit 88c556f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions organize/filters/exif.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,11 @@ def exiftool_read(path: Path) -> ExifStrDict:
# we pass a single filepath, so we are interested in the first element
data: Dict = json.loads(data_json)[0]

# if data contains no media specific EXIF keys we assume we don't have
# any relevant EXIF data.
if "Composite" not in data.keys():
# if the result only contains "File", "SourceFile" and "ExifTool" it means exiftool
# couldn't find any additional data about this file.
if set(data.keys()) == set(["SourceFile", "ExifTool", "File"]):
return dict()

return data


Expand Down

0 comments on commit 88c556f

Please sign in to comment.