mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 18:47:09 -07:00
parent
66edc921de
commit
8248c14887
6 changed files with 33 additions and 5 deletions
|
@ -202,6 +202,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
|
||||
|
||||
nzbName = str(nzbName) # make sure it is a string
|
||||
|
||||
imdbid = get_imdb(nzbName, dirName)
|
||||
|
@ -235,7 +240,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
|
||||
|
||||
|
|
|
@ -231,8 +231,8 @@ def addnzbget():
|
|||
confignew.read(configFilenamenew)
|
||||
|
||||
section = "CouchPotato"
|
||||
envKeys = ['CATEGORY', 'APIKEY', 'HOST', 'PORT', 'SSL', 'WEB_ROOT', 'DELAY', 'METHOD', 'DELETE_FAILED']
|
||||
cfgKeys = ['cpsCategory', 'apikey', 'host', 'port', 'ssl', 'web_root', 'delay', 'method', 'delete_failed']
|
||||
envKeys = ['CATEGORY', 'APIKEY', 'HOST', 'PORT', 'SSL', 'WEB_ROOT', 'DELAY', 'METHOD', 'DELETE_FAILED', 'REMOTECPS']
|
||||
cfgKeys = ['cpsCategory', 'apikey', 'host', 'port', 'ssl', 'web_root', 'delay', 'method', 'delete_failed', 'remoteCPS']
|
||||
for index in range(len(envKeys)):
|
||||
key = 'NZBPO_CPS' + envKeys[index]
|
||||
if os.environ.has_key(key):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue