Detects ffmpeg and ffprobe at startup but will alert you to if there missing only when needed to be used so that we don't get a stupid error message at startup for no reason.

This commit is contained in:
echel0n 2014-04-19 17:55:44 -07:00
commit 8434a58df0
5 changed files with 26 additions and 23 deletions

View file

@ -14,6 +14,10 @@ class Transcoder:
else:
bitbucket = open('/dev/null')
if not nzbtomedia.FFPROBE:
logger.error("Cannot detect corrupt video files!, set your ffmpeg_path in your autoProcessMedia.cfg ...")
return False
command = [nzbtomedia.FFPROBE, videofile]
try:
logger.info('Checking if %s has any corruption, please stand by ...' % (videofile))
@ -35,6 +39,10 @@ class Transcoder:
else:
bitbucket = open('/dev/null')
if not nzbtomedia.FFMPEG:
logger.error("Cannot transcode files!, set your ffmpeg_path in your autoProcessMedia.cfg ...")
return 1
logger.info("Checking for files to be transcoded")
final_result = 0 # initialize as successful
for file in listMediaFiles(dirName):