mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
Improved the detection of ffmpeg on non-Windows systems
This commit is contained in:
parent
2248538f3c
commit
21673659a0
1 changed files with 3 additions and 1 deletions
|
@ -15,7 +15,7 @@ def Transcode_directory(dirName):
|
||||||
Logger.info("Cannot transcode files in folder %s", dirName)
|
Logger.info("Cannot transcode files in folder %s", dirName)
|
||||||
return 1 # failure
|
return 1 # failure
|
||||||
else:
|
else:
|
||||||
if call(['which', 'ffmpeg']):
|
if call(['which', 'ffmpeg']) != 0:
|
||||||
res = call([os.path.join(os.path.dirname(sys.argv[0]),'getffmpeg.sh')])
|
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.
|
if res or call(['which', 'ffmpeg']): # did not install or ffmpeg still not found.
|
||||||
Logger.error("Failed to install ffmpeg. Please install manually")
|
Logger.error("Failed to install ffmpeg. Please install manually")
|
||||||
|
@ -23,6 +23,8 @@ def Transcode_directory(dirName):
|
||||||
return 1 # failure
|
return 1 # failure
|
||||||
else:
|
else:
|
||||||
ffmpeg = 'ffmpeg'
|
ffmpeg = 'ffmpeg'
|
||||||
|
else:
|
||||||
|
ffmpeg = 'ffmpeg'
|
||||||
|
|
||||||
config = ConfigParser.ConfigParser()
|
config = ConfigParser.ConfigParser()
|
||||||
configFilename = os.path.join(os.path.dirname(sys.argv[0]), "autoProcessMedia.cfg")
|
configFilename = os.path.join(os.path.dirname(sys.argv[0]), "autoProcessMedia.cfg")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue