diff --git a/data/interfaces/default/config.html b/data/interfaces/default/config.html index 4993192d..4c39f17d 100644 --- a/data/interfaces/default/config.html +++ b/data/interfaces/default/config.html @@ -58,7 +58,7 @@

SABnzbd Host:


- usually localhost:8080 + usually http://localhost:8080 diff --git a/headphones/sab.py b/headphones/sab.py index d6433ce7..8c20d717 100644 --- a/headphones/sab.py +++ b/headphones/sab.py @@ -65,7 +65,10 @@ def sendNZB(nzb): params['mode'] = 'addfile' multiPartParams = {"nzbfile": (nzb.name+".nzb", nzb.extraInfo[0])} - url = "http://" + headphones.SAB_HOST + "/" + "api?" + urllib.urlencode(params) + if not headphones.SAB_HOST.startswith('http://') or headphones.SAB_HOST.startswith('https://'): + headphones.SAB_HOST = 'http://' + headphones.SAB_HOST + + url = headphones.SAB_HOST + "/" + "api?" + urllib.urlencode(params) try: