Skip to content

Commit

Permalink
Check for Composite key in exiftool data
Browse files Browse the repository at this point in the history
  • Loading branch information
tfeldmann committed Jan 12, 2024
1 parent 0ebf8bd commit 0b18508
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions organize/filters/exif.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def exiftool_read(path: Path) -> ExifStrDict:

# if data contains no media specific EXIF keys we assume we don't have
# any relevant EXIF data.
if "EXIF" not in data.keys():
if "Composite" not in data.keys():
return dict()
return data

Expand Down Expand Up @@ -268,6 +268,9 @@ def pipeline(self, res: Resource, output: Output) -> bool:
# Usage:
# python organize/filters/exif.py tests/resources/images-with-exif/3.jpg
data = exifread_read(Path(sys.argv[1]))
print(data)
data = exiftool_read(Path(sys.argv[1]))
print(data)
print("Exifread", data)
if exiftool_available():
data = exiftool_read(Path(sys.argv[1]))
print("Exiftool", data)
else:
print("Exiftool not available")

0 comments on commit 0b18508

Please sign in to comment.