mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
We seperated checks for ffmpeg and ffprobe so each disable seperately if not found.
This commit is contained in:
parent
cf483bbe29
commit
cad690cf97
1 changed files with 15 additions and 8 deletions
|
@ -275,22 +275,29 @@ def initialize(section=None):
|
|||
FFMPEG = joinPath(FFMPEG_PATH, 'ffmpeg.exe')
|
||||
FFPROBE = joinPath(FFMPEG_PATH, 'ffprobe.exe')
|
||||
|
||||
if not (os.path.isfile(FFMPEG) or os.path.isfile(FFMPEG)): # problem
|
||||
logger.warning("Failed to locate ffmpeg or ffprobe, Transcoding features disabled!")
|
||||
logger.warning("Install ffmpeg with x264 support to enable transcoding features ...")
|
||||
|
||||
if not (os.path.isfile(FFMPEG)): # problem
|
||||
FFMPEG = None
|
||||
logger.warning("Failed to locate %s, transcoding disabled!" % (FFMPEG))
|
||||
logger.warning("Install ffmpeg with x264 support to enable this feature ...")
|
||||
|
||||
if not (os.path.isfile(FFPROBE)): # problem
|
||||
FFPROBE = None
|
||||
logger.warning("Failed to locate %s, video corruption detection disabled!" % (FFPROBE))
|
||||
logger.warning("Install ffmpeg with x264 support to enable this feature ...")
|
||||
|
||||
else:
|
||||
FFMPEG = subprocess.Popen(['which', 'ffmpeg'], stdout=subprocess.PIPE).communicate()[0].strip()
|
||||
FFPROBE = subprocess.Popen(['which', 'ffprobe'], stdout=subprocess.PIPE).communicate()[0].strip()
|
||||
|
||||
if not (FFMPEG or FFPROBE):
|
||||
logger.warning("Failed to locate ffmpeg or ffprobe, Transcoding features disabled!")
|
||||
logger.warning("Install ffmpeg with x264 support to enable transcoding features ...")
|
||||
|
||||
if not FFMPEG:
|
||||
FFMPEG = None
|
||||
logger.warning("Failed to locate ffmpeg, transcoding disabled!")
|
||||
logger.warning("Install ffmpeg with x264 support to enable this feature ...")
|
||||
|
||||
if not FFMPEG:
|
||||
FFPROBE = None
|
||||
logger.warning("Failed to locate ffprobe, video corruption detection disabled!")
|
||||
logger.warning("Install ffmpeg with x264 support to enable this feature ...")
|
||||
|
||||
USER_SCRIPT_CATEGORIES = CFG["UserScript"]["user_script_categories"]
|
||||
if not "NONE" in USER_SCRIPT_CATEGORIES:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue