mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-09 21:29:27 +01:00
Merge pull request #382 from palli81/master
Sending to SABnzbd doesn't work if SAB_HOST ends with a slash
This commit is contained in:
@@ -67,6 +67,9 @@ def sendNZB(nzb):
|
||||
|
||||
if not headphones.SAB_HOST.startswith('http'):
|
||||
headphones.SAB_HOST = 'http://' + headphones.SAB_HOST
|
||||
|
||||
if headphones.SAB_HOST.endswith('/'):
|
||||
headphones.SAB_HOST = headphones.SAB_HOST[0:len(headphones.SAB_HOST)-1]
|
||||
|
||||
url = headphones.SAB_HOST + "/" + "api?" + urllib.urlencode(params)
|
||||
|
||||
@@ -119,4 +122,4 @@ def sendNZB(nzb):
|
||||
return False
|
||||
else:
|
||||
logger.info(u"Unknown failure sending NZB to sab. Return text is: " + sabText)
|
||||
return False
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user