From fb786c44f53e794ebbe564285c8278b07212ccda Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Mon, 24 Apr 2017 11:24:37 +0930 Subject: [PATCH] don't try and process when no api/user. Fixes #1240 --- core/autoProcess/autoProcessMovie.py | 4 ++++ core/autoProcess/autoProcessTV.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/core/autoProcess/autoProcessMovie.py b/core/autoProcess/autoProcessMovie.py index 54182f06..3665e670 100644 --- a/core/autoProcess/autoProcessMovie.py +++ b/core/autoProcess/autoProcessMovie.py @@ -263,6 +263,10 @@ class autoProcessMovie(object): logger.debug('Renaming: {0} to: {1}'.format(video, video2)) os.rename(video, video2) + if not apikey: #If only using Transcoder functions, exit here. + logger.info('No CouchPotato or Radarr apikey entered. Processing completed.') + return [0, "{0}: Successfully post-processed {1}".format(section, inputName)] + params = {} if download_id: params['downloader'] = downloader or clientAgent diff --git a/core/autoProcess/autoProcessTV.py b/core/autoProcess/autoProcessTV.py index 4c161787..4ebc9735 100644 --- a/core/autoProcess/autoProcessTV.py +++ b/core/autoProcess/autoProcessTV.py @@ -226,6 +226,9 @@ class autoProcessTV(object): [fork_params.pop(k) for k, v in fork_params.items() if v is None] if status == 0: + if not username and not apikey: + logger.info('No SickBeard username or Sonarr apikey entered. Processing completed.') + return [0, "{0}: Successfully post-processed {1}".format(section, inputName)] logger.postprocess("SUCCESS: The download succeeded, sending a post-process request", section) else: core.FAILED = True