From ed0494b5407a261a78e9b5689ef69e16d2cd7a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tronel?= Date: Fri, 1 Dec 2023 16:46:16 +0100 Subject: [PATCH] Tools that are search for at startup are now categorized in required and optional. --- removeads.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/removeads.py b/removeads.py index 3629b80..a8f4e86 100755 --- a/removeads.py +++ b/removeads.py @@ -26,11 +26,15 @@ from shutil import copyfile, which def checkRequiredTools(): logger = logging.getLogger(__name__) - tools = ['ffmpeg', 'ffprobe', 'mkvmerge'] - for tool in tools: + required = ['ffmpeg', 'ffprobe', 'mkvmerge'] + optional = ['mkvextract', 'vobusbocr'] + for tool in required: if which(tool) == None: logger.error('Required tool: %s is missing.' % tool) exit(-1) + for tool in optional: + if which(tool) == None: + logger.info('Optional tool: %s is missing.' % tool) @unique