From 88c556f3f29833412714feda8ebd41ff4d7faf12 Mon Sep 17 00:00:00 2001 From: Thomas Feldmann Date: Mon, 25 Nov 2024 14:23:04 +0100 Subject: [PATCH] support exiftool for non-media files (fixes #419) --- organize/filters/exif.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/organize/filters/exif.py b/organize/filters/exif.py index f6ee9873..c1e55cca 100644 --- a/organize/filters/exif.py +++ b/organize/filters/exif.py @@ -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