aboutsummaryrefslogtreecommitdiffstats
path: root/mat2
diff options
context:
space:
mode:
authorjvoisin <julien.voisin@dustri.org>2018-10-18 19:19:56 +0200
committerjvoisin <julien.voisin@dustri.org>2018-10-22 12:58:01 +0200
commite70ea811c99c16f3382c08153eda573df0825536 (patch)
treef1c05ca94b9d2ab09f74cfa6c7191bf73bf104e2 /mat2
parent2ae5d909c3e30c009bfc45bceba96ddd82f3e198 (diff)
downloadexternal_mat2-e70ea811c99c16f3382c08153eda573df0825536.tar.gz
external_mat2-e70ea811c99c16f3382c08153eda573df0825536.tar.bz2
external_mat2-e70ea811c99c16f3382c08153eda573df0825536.zip
Implement support for .avi files, via ffmpeg
- This commit introduces optional dependencies (namely ffmpeg): mat2 will spit a warning when trying to process an .avi file if ffmpeg isn't installed. - Since metadata are obtained via exiftool, this commit also refactors a bit our exfitool wrapper.
Diffstat (limited to 'mat2')
-rwxr-xr-xmat28
1 files changed, 7 insertions, 1 deletions
diff --git a/mat2 b/mat2
index 1665576..01263b6 100755
--- a/mat2
+++ b/mat2
@@ -97,7 +97,13 @@ def clean_meta(filename: str, is_lightweight: bool, policy: UnknownMemberPolicy)
return False
p.unknown_member_policy = policy
p.lightweight_cleaning = is_lightweight
- return p.remove_all()
+
+ try:
+ return p.remove_all()
+ except RuntimeError as e:
+ print("[-] %s can't be cleaned: %s" % (filename, e))
+ return False
+
def show_parsers() -> bool: