add https for SABnzbd. Fixes #823

This commit is contained in:
clinton-hall 2015-09-14 19:43:14 +09:30
commit 6ab821c5ea
2 changed files with 9 additions and 3 deletions

View file

@ -798,7 +798,10 @@ def find_download(clientAgent, download_id):
if clientAgent == 'deluge':
return False
if clientAgent == 'sabnzbd':
baseURL = "http://%s:%s/api" % (core.SABNZBDHOST, core.SABNZBDPORT)
if "http" in core.SABNZBDHOST:
baseURL = "%s:%s/api" % (core.SABNZBDHOST, core.SABNZBDPORT)
else:
baseURL = "http://%s:%s/api" % (core.SABNZBDHOST, core.SABNZBDPORT)
url = baseURL
params = {}
params['apikey'] = core.SABNZBDAPIKEY
@ -819,7 +822,10 @@ def find_download(clientAgent, download_id):
def get_nzoid(inputName):
nzoid = None
logger.debug("Searching for nzoid from SAbnzbd ...")
baseURL = "http://%s:%s/api" % (core.SABNZBDHOST, core.SABNZBDPORT)
if "http" in core.SABNZBDHOST:
baseURL = "%s:%s/api" % (core.SABNZBDHOST, core.SABNZBDPORT)
else:
baseURL = "http://%s:%s/api" % (core.SABNZBDHOST, core.SABNZBDPORT)
url = baseURL
params = {}
params['apikey'] = core.SABNZBDAPIKEY