diff --git a/autoProcessMedia.cfg.spec b/autoProcessMedia.cfg.spec index 745268ad..c8da2f74 100644 --- a/autoProcessMedia.cfg.spec +++ b/autoProcessMedia.cfg.spec @@ -19,6 +19,8 @@ log_db = 0 # Set to where your ffmpeg/ffprobe executables are located ffmpeg_path = + # Enable/Disable media file checking using ffprobe. + check_media = 1 [CouchPotato] #### autoProcessing for Movies diff --git a/nzbToCouchPotato.py b/nzbToCouchPotato.py index fce1aad7..77ae4635 100755 --- a/nzbToCouchPotato.py +++ b/nzbToCouchPotato.py @@ -19,6 +19,11 @@ # Set to 1 if you want nzbToMedia to automatically check for and update to the latest version #auto_update=0 +# Check Media for corruption (0, 1). +# +# Enable/Disable media file checking using ffprobe. +#check_media=1 + ## CouchPotato # CouchPotato script category. diff --git a/nzbToMedia.py b/nzbToMedia.py index ee68fdad..0c1a40e1 100755 --- a/nzbToMedia.py +++ b/nzbToMedia.py @@ -19,6 +19,11 @@ # Set to 1 if you want nzbToMedia to automatically check for and update to the latest version #auto_update=0 +# Check Media for corruption (0, 1). +# +# Enable/Disable media file checking using ffprobe. +#check_media=1 + ## CouchPotato # CouchPotato script category. diff --git a/nzbToNzbDrone.py b/nzbToNzbDrone.py index a5f415cd..b9d9181b 100755 --- a/nzbToNzbDrone.py +++ b/nzbToNzbDrone.py @@ -19,6 +19,11 @@ # Set to 1 if you want nzbToMedia to automatically check for and update to the latest version #auto_update=0 +# Check Media for corruption (0, 1). +# +# Enable/Disable media file checking using ffprobe. +#check_media=1 + ## NzbDrone # NzbDrone script category. diff --git a/nzbToSickBeard.py b/nzbToSickBeard.py index 95014570..c1a541a0 100755 --- a/nzbToSickBeard.py +++ b/nzbToSickBeard.py @@ -19,6 +19,11 @@ # Set to 1 if you want nzbToMedia to automatically check for and update to the latest version #auto_update=0 +# Check Media for corruption (0, 1). +# +# Enable/Disable media file checking using ffprobe. +#check_media=1 + # Media Extensions # # This is a list of media extensions that are used to verify that the download does contain valid media. diff --git a/nzbtomedia/__init__.py b/nzbtomedia/__init__.py index 4eb551c3..527de740 100644 --- a/nzbtomedia/__init__.py +++ b/nzbtomedia/__init__.py @@ -230,6 +230,7 @@ def initialize(section=None): GIT_BRANCH = CFG['General']['git_branch'] or 'dev' FORCE_CLEAN = CFG["General"]["force_clean"] FFMPEG_PATH = CFG["General"]["ffmpeg_path"] + CHECK_MEDIA = int(CFG["General"]["check_Media"] # Check for updates via GitHUB if versionCheck.CheckVersion().check_for_new_version(): @@ -314,7 +315,7 @@ def initialize(section=None): logger.warning("Failed to locate ffmpeg.exe, transcoding disabled!") logger.warning("Install ffmpeg with x264 support to enable this feature ...") - if not (os.path.isfile(FFPROBE)): # problem + if not (os.path.isfile(FFPROBE)) and CHECK_MEDIA: # problem FFPROBE = None logger.warning("Failed to locate ffprobe.exe, video corruption detection disabled!") logger.warning("Install ffmpeg with x264 support to enable this feature ...") @@ -331,7 +332,7 @@ def initialize(section=None): logger.warning("Failed to locate ffmpeg, transcoding disabled!") logger.warning("Install ffmpeg with x264 support to enable this feature ...") - if not FFPROBE: + if not FFPROBE and CHECK_MEDIA: if os.access(os.path.join(FFMPEG_PATH, 'ffprobe'), os.X_OK): FFPROBE = os.path.join(FFMPEG_PATH, 'ffprobe') else: @@ -339,6 +340,9 @@ def initialize(section=None): logger.warning("Failed to locate ffprobe, video corruption detection disabled!") logger.warning("Install ffmpeg with x264 support to enable this feature ...") + if not CHECK_MEDIA: # allow users to bypass this. + FFPROBE = None + # userscript map(USER_SCRIPT_CATEGORIES.append, ([subsections[0] for subsections in CFG['UserScript'].items()])) diff --git a/nzbtomedia/nzbToMediaConfig.py b/nzbtomedia/nzbToMediaConfig.py index 2a37bca3..b1d5e5cf 100644 --- a/nzbtomedia/nzbToMediaConfig.py +++ b/nzbtomedia/nzbToMediaConfig.py @@ -229,8 +229,8 @@ class ConfigObj(configobj.ConfigObj, Section): try: section = "General" - envKeys = ['AUTO_UPDATE'] - cfgKeys = ['auto_update'] + envKeys = ['AUTO_UPDATE', 'CHECK_MEDIA'] + cfgKeys = ['auto_update', 'check_media'] for index in range(len(envKeys)): key = 'NZBPO_' + envKeys[index] if os.environ.has_key(key):