From 21673659a0571910f4653cf8ba5a60b06a8dc430 Mon Sep 17 00:00:00 2001 From: NightExcessive Date: Sun, 31 Mar 2013 14:07:21 -0400 Subject: [PATCH] Improved the detection of ffmpeg on non-Windows systems --- autoProcess/Transcoder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoProcess/Transcoder.py b/autoProcess/Transcoder.py index d1a37ab6..a4619624 100644 --- a/autoProcess/Transcoder.py +++ b/autoProcess/Transcoder.py @@ -15,7 +15,7 @@ def Transcode_directory(dirName): Logger.info("Cannot transcode files in folder %s", dirName) return 1 # failure else: - if call(['which', 'ffmpeg']): + if call(['which', 'ffmpeg']) != 0: res = call([os.path.join(os.path.dirname(sys.argv[0]),'getffmpeg.sh')]) if res or call(['which', 'ffmpeg']): # did not install or ffmpeg still not found. Logger.error("Failed to install ffmpeg. Please install manually") @@ -23,6 +23,8 @@ def Transcode_directory(dirName): return 1 # failure else: ffmpeg = 'ffmpeg' + else: + ffmpeg = 'ffmpeg' config = ConfigParser.ConfigParser() configFilename = os.path.join(os.path.dirname(sys.argv[0]), "autoProcessMedia.cfg")