From 9ddb094ec747edf7e283404744a1dc47de4ec7c5 Mon Sep 17 00:00:00 2001 From: Jaisen Mathai Date: Sat, 9 Mar 2019 23:01:28 -0800 Subject: [PATCH] Specify fully qualified path for exiftool program (#304) --- elodie/media/media.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/elodie/media/media.py b/elodie/media/media.py index bb07675..1eca732 100644 --- a/elodie/media/media.py +++ b/elodie/media/media.py @@ -126,7 +126,7 @@ class Media(Base): if(exiftool is None): return False - with ExifTool(addedargs=self.exiftool_addedargs) as et: + with ExifTool(executable_=exiftool, addedargs=self.exiftool_addedargs) as et: metadata = et.get_metadata(source) if not metadata: return False @@ -318,9 +318,13 @@ class Media(Base): return None source = self.source + exiftool = get_exiftool() + if(exiftool is None): + return False + status = '' - with ExifTool(addedargs=self.exiftool_addedargs) as et: + with ExifTool(executable_=exiftool, addedargs=self.exiftool_addedargs) as et: status = et.set_tags(tags, source) return status != ''