diff --git a/autoProcessMedia.cfg.spec b/autoProcessMedia.cfg.spec index e846c16a..ee5baf3f 100644 --- a/autoProcessMedia.cfg.spec +++ b/autoProcessMedia.cfg.spec @@ -206,7 +206,7 @@ ###### clientAgent - Supported clients: sabnzbd, nzbget clientAgent = sabnzbd ###### SabNZBD (You must edit this if your using nzbToMedia.py with SabNZBD) - sabnzbd_host = localhost + sabnzbd_host = http://localhost sabnzbd_port = 8080 sabnzbd_apikey = ###### Enter the default path to your default download directory (non-category downloads). this directory is protected by safe_mode. diff --git a/core/nzbToMediaUtil.py b/core/nzbToMediaUtil.py index f6491274..19602728 100644 --- a/core/nzbToMediaUtil.py +++ b/core/nzbToMediaUtil.py @@ -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