From 098135263a45585bc9647c0b6075b1c21caf738e Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Thu, 15 Jun 2017 22:48:37 +0930 Subject: [PATCH] add omdbapi key to Radarr config. Fixes #1266 --- autoProcessMedia.cfg.spec | 6 ++++-- core/nzbToMediaConfig.py | 8 ++++---- nzbToCouchPotato.py | 5 +++++ nzbToMedia.py | 10 ++++++++++ nzbToRadarr.py | 5 +++++ 5 files changed, 28 insertions(+), 6 deletions(-) diff --git a/autoProcessMedia.cfg.spec b/autoProcessMedia.cfg.spec index f68cbd04..f99be837 100644 --- a/autoProcessMedia.cfg.spec +++ b/autoProcessMedia.cfg.spec @@ -51,6 +51,8 @@ ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ###### ssl = 0 web_root = + # api key for www.omdbapi.com (used as alternative to imdb) + omdbapikey = # Enable/Disable linking for Torrents Torrent_NoLink = 0 keep_archive = 1 @@ -68,8 +70,6 @@ watch_dir = ##### Set the recursive directory permissions to the following (0 to disable) chmodDirectory = 0 - # api key for www.omdbapi.com (used as alternative to imdb) - omdbapikey = [Radarr] #### autoProcessing for Movies @@ -82,6 +82,8 @@ ###### ADVANCED USE - ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ###### web_root = ssl = 0 + # api key for www.omdbapi.com (used as alternative to imdb) + omdbapikey = delete_failed = 0 # Enable/Disable linking for Torrents Torrent_NoLink = 0 diff --git a/core/nzbToMediaConfig.py b/core/nzbToMediaConfig.py index b37cfc1f..0b2222d3 100644 --- a/core/nzbToMediaConfig.py +++ b/core/nzbToMediaConfig.py @@ -293,9 +293,9 @@ class ConfigObj(configobj.ConfigObj, Section): section = "CouchPotato" envCatKey = 'NZBPO_CPSCATEGORY' envKeys = ['ENABLED', 'APIKEY', 'HOST', 'PORT', 'SSL', 'WEB_ROOT', 'METHOD', 'DELETE_FAILED', 'REMOTE_PATH', - 'WAIT_FOR', 'WATCH_DIR'] + 'WAIT_FOR', 'WATCH_DIR', 'OMDBAPIKEY'] cfgKeys = ['enabled', 'apikey', 'host', 'port', 'ssl', 'web_root', 'method', 'delete_failed', 'remote_path', - 'wait_for', 'watch_dir'] + 'wait_for', 'watch_dir', 'omdbapikey'] if envCatKey in os.environ: for index in range(len(envKeys)): key = 'NZBPO_CPS{index}'.format(index=envKeys[index]) @@ -397,9 +397,9 @@ class ConfigObj(configobj.ConfigObj, Section): section = "Radarr" envCatKey = 'NZBPO_RACATEGORY' envKeys = ['ENABLED', 'HOST', 'APIKEY', 'PORT', 'SSL', 'WEB_ROOT', 'WATCH_DIR', 'FORK', 'DELETE_FAILED', - 'TORRENT_NOLINK', 'NZBEXTRACTIONBY', 'WAIT_FOR', 'DELETE_FAILED', 'REMOTE_PATH'] + 'TORRENT_NOLINK', 'NZBEXTRACTIONBY', 'WAIT_FOR', 'DELETE_FAILED', 'REMOTE_PATH', 'OMDBAPIKEY'] cfgKeys = ['enabled', 'host', 'apikey', 'port', 'ssl', 'web_root', 'watch_dir', 'fork', 'delete_failed', - 'Torrent_NoLink', 'nzbExtractionBy', 'wait_for', 'delete_failed', 'remote_path'] + 'Torrent_NoLink', 'nzbExtractionBy', 'wait_for', 'delete_failed', 'remote_path', 'omdbapikey'] if envCatKey in os.environ: for index in range(len(envKeys)): key = 'NZBPO_RA{index}'.format(index=envKeys[index]) diff --git a/nzbToCouchPotato.py b/nzbToCouchPotato.py index c74d2b15..ec30db9a 100755 --- a/nzbToCouchPotato.py +++ b/nzbToCouchPotato.py @@ -68,6 +68,11 @@ # set this to where your CouchPotato completed downloads are. #cpswatch_dir= +# CouchPotato OMDB API Key. +# +# api key for www.omdbapi.com (used as alternative to imdb to assist with movie identification). +#cpsomdbapikey= + # CouchPotato Postprocess Method (renamer, manage). # # use "renamer" for CPS renamer (default) or "manage" to call a manage update. diff --git a/nzbToMedia.py b/nzbToMedia.py index f4f8f55b..eadec7ee 100755 --- a/nzbToMedia.py +++ b/nzbToMedia.py @@ -68,6 +68,11 @@ # use "renamer" for CPS renamer (default) or "manage" to call a manage update. #cpsmethod=renamer +# CouchPotato OMDB API Key. +# +# api key for www.omdbapi.com (used as alternative to imdb to assist with movie identification). +#cpsomdbapikey= + # CouchPotato Delete Failed Downloads (0, 1). # # set to 1 to delete failed, or 0 to leave files in place. @@ -116,6 +121,11 @@ # Set the number of minutes to wait after calling the renamer, to check the episode has changed status. #rawait_for=6 +# Radarr OMDB API Key. +# +# api key for www.omdbapi.com (used as alternative to imdb to assist with movie identification). +#raomdbapikey= + # Radarr Delete Failed Downloads (0, 1). # # set to 1 to delete failed, or 0 to leave files in place. diff --git a/nzbToRadarr.py b/nzbToRadarr.py index 321c8a63..c2f22206 100755 --- a/nzbToRadarr.py +++ b/nzbToRadarr.py @@ -63,6 +63,11 @@ # set this if using a reverse proxy. #raweb_root= +# Radarr OMDB API Key. +# +# api key for www.omdbapi.com (used as alternative to imdb to assist with movie identification). +#raomdbapikey= + # Radarr wait_for # # Set the number of minutes to wait after calling the renamer, to check the episode has changed status.