mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-20 16:03:59 +01:00
Fix for nzbget connection url (#2135)
This commit is contained in:
@@ -11,6 +11,7 @@ Highlights:
|
|||||||
* Fixed: Connecting to SABnzbd over https with python >= 2.7.9
|
* Fixed: Connecting to SABnzbd over https with python >= 2.7.9
|
||||||
* Fixed: Email Notifications with SSL
|
* Fixed: Email Notifications with SSL
|
||||||
* Fixed: Don't limit musicbrainz results to first 100
|
* Fixed: Don't limit musicbrainz results to first 100
|
||||||
|
* Fixed: nzbget url fix
|
||||||
* Improved: Cuesplit, allow wav, ape to be split
|
* Improved: Cuesplit, allow wav, ape to be split
|
||||||
* Improved: Moved the 'freeze db' option to the advanced->misc. tab
|
* Improved: Moved the 'freeze db' option to the advanced->misc. tab
|
||||||
* Improved: Moved kickass searching to json api, so it doesn't throw 404 errors anymore when there are no results
|
* Improved: Moved kickass searching to json api, so it doesn't throw 404 errors anymore when there are no results
|
||||||
|
|||||||
@@ -32,20 +32,20 @@ from headphones import logger
|
|||||||
def sendNZB(nzb):
|
def sendNZB(nzb):
|
||||||
|
|
||||||
addToTop = False
|
addToTop = False
|
||||||
nzbgetXMLrpc = "%(username)s:%(password)s@%(host)s/xmlrpc"
|
nzbgetXMLrpc = "%(protocol)s://%(username)s:%(password)s@%(host)s/xmlrpc"
|
||||||
|
|
||||||
if headphones.CONFIG.NZBGET_HOST is None:
|
if not headphones.CONFIG.NZBGET_HOST:
|
||||||
logger.error(u"No NZBget host found in configuration. Please configure it.")
|
logger.error(u"No NZBget host found in configuration. Please configure it.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if headphones.CONFIG.NZBGET_HOST.startswith('https://'):
|
if headphones.CONFIG.NZBGET_HOST.startswith('https://'):
|
||||||
nzbgetXMLrpc = 'https://' + nzbgetXMLrpc
|
protocol = 'https'
|
||||||
headphones.CONFIG.NZBGET_HOST.replace('https://', '', 1)
|
host = headphones.CONFIG.NZBGET_HOST.replace('https://', '', 1)
|
||||||
else:
|
else:
|
||||||
nzbgetXMLrpc = 'http://' + nzbgetXMLrpc
|
protocol = 'http'
|
||||||
headphones.CONFIG.NZBGET_HOST.replace('http://', '', 1)
|
host = headphones.CONFIG.NZBGET_HOST.replace('http://', '', 1)
|
||||||
|
|
||||||
url = nzbgetXMLrpc % {"host": headphones.CONFIG.NZBGET_HOST, "username": headphones.CONFIG.NZBGET_USERNAME, "password": headphones.CONFIG.NZBGET_PASSWORD}
|
url = nzbgetXMLrpc % {"protocol": protocol, "host": host, "username": headphones.CONFIG.NZBGET_USERNAME, "password": headphones.CONFIG.NZBGET_PASSWORD}
|
||||||
|
|
||||||
nzbGetRPC = xmlrpclib.ServerProxy(url)
|
nzbGetRPC = xmlrpclib.ServerProxy(url)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user