mirror of
https://github.com/rembo10/headphones.git
synced 2026-03-21 20:29:27 +00:00
Merge branch 'hotfix-mirror-newzbin'
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user