Remove movie folder location from CP renamer params if CP server is running on a different server than the NZB CLient. #162

This commit is contained in:
Declan McCormack 2013-07-10 10:07:58 +02:00
commit a8d65c55a2
2 changed files with 11 additions and 1 deletions

View file

@ -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,6 +262,9 @@ def process(dirName, nzbName=None, status=0, clientAgent = "manual", download_id
else:
command = "renamer.scan"
if clientAgent != "manual" and download_id != "none":
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

View file

@ -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]