Merge branch 'hotfix-mirror-newzbin'

This commit is contained in:
Remy Varma
2012-02-22 20:42:18 +00:00
3 changed files with 8 additions and 4 deletions

View File

@@ -134,7 +134,7 @@ PROWL_ENABLED = True
PROWL_PRIORITY = 1
PROWL_KEYS = None
PROWL_ONSNATCH = True
MIRRORLIST = ["musicbrainz.org","tbueter.com","localhost"]
MIRRORLIST = ["musicbrainz.org","headphones","tbueter.com","localhost"]
MIRROR = None
def CheckSection(sec):
@@ -303,7 +303,7 @@ def initialize():
PROWL_ONSNATCH = bool(check_setting_int(CFG, 'Prowl', 'prowl_onsnatch', 0))
PROWL_PRIORITY = check_setting_int(CFG, 'Prowl', 'prowl_priority', 0)
MIRROR = check_setting_str(CFG, 'General', 'mirror', 'tbueter.com')
MIRROR = check_setting_str(CFG, 'General', 'mirror', 'headphones')
if not LOG_DIR:
LOG_DIR = os.path.join(DATA_DIR, 'logs')

View File

@@ -24,6 +24,10 @@ def startmb():
mbhost = "localhost"
mbport = 7143
sleepytime = 0
elif headphones.MIRROR == "headphones":
mbhost = "178.63.142.150"
mbport = 5000
sleepytime = 0
elif headphones.MIRROR == "tbueter.com":
mbhost = "tbueter.com"
mbport = 3000

View File

@@ -300,7 +300,7 @@ def searchNZB(albumid=None, new=False):
if headphones.NEWZBIN:
provider = "newzbin"
providerurl = "https://www.newzbin.com/"
providerurl = "https://www.newzbin2.es/"
if headphones.PREFERRED_QUALITY == 3:
categories = "7" #music
format = "2" #flac
@@ -506,7 +506,7 @@ def getresultNZB(result):
if result[3] == 'newzbin':
params = urllib.urlencode({"username": headphones.NEWZBIN_UID, "password": headphones.NEWZBIN_PASSWORD, "reportid": result[2]})
url = "https://www.newzbin.com" + "/api/dnzb/"
url = "https://www.newzbin2.es" + "/api/dnzb/"
urllib._urlopener = NewzbinDownloader()
try:
nzb = urllib.urlopen(url, data=params).read()