From a8d65c55a2a71f3fa82b740803f13868500c0aaa Mon Sep 17 00:00:00 2001 From: Declan McCormack Date: Wed, 10 Jul 2013 10:07:58 +0200 Subject: [PATCH] Remove movie folder location from CP renamer params if CP server is running on a different server than the NZB CLient. #162 --- autoProcess/autoProcessMovie.py | 10 +++++++++- autoProcessMedia.cfg.sample | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/autoProcess/autoProcessMovie.py b/autoProcess/autoProcessMovie.py index f0597408..831cdc82 100644 --- a/autoProcess/autoProcessMovie.py +++ b/autoProcess/autoProcessMovie.py @@ -222,6 +222,11 @@ def process(dirName, nzbName=None, status=0, clientAgent = "manual", download_id except (ConfigParser.NoOptionError, ValueError): transcode = 0 + try: + remoteCPS = int(config.get("CouchPotato", "remoteCPS")) + except (ConfigParser.NoOptionError, ValueError): + remoteCPS = 0 + myOpener = AuthURLOpener(username, password) nzbName = str(nzbName) # make sure it is a string @@ -257,7 +262,10 @@ def process(dirName, nzbName=None, status=0, clientAgent = "manual", download_id else: command = "renamer.scan" if clientAgent != "manual" and download_id != "none": - command = command + "/?movie_folder=" + dirName + "&downloader=" + clientAgent + "&download_id=" + download_id + if remoteCPS == 1: + command = command + "/?downloader=" + clientAgent + "&download_id=" + download_id + else: + command = command + "/?movie_folder=" + dirName + "&downloader=" + clientAgent + "&download_id=" + download_id url = baseURL + command diff --git a/autoProcessMedia.cfg.sample b/autoProcessMedia.cfg.sample index 6c68642f..d4aaa303 100644 --- a/autoProcessMedia.cfg.sample +++ b/autoProcessMedia.cfg.sample @@ -17,6 +17,8 @@ delay = 65 method = renamer delete_failed = 0 wait_for = 2 +#### Set to 1 if CouchPotatoServer is running on a different server to your NZB client +remoteCPS = 0 [SickBeard]