mirror of
https://github.com/evilhero/mylar
synced 2025-02-02 20:41:57 +00:00
FIX: configuration wouldn't save (typo), FIX: Changed some error messages when doing Test SABnzbd and auto-grabbing API
This commit is contained in:
parent
dfde9197bb
commit
0fa7a25f17
2 changed files with 8 additions and 8 deletions
|
@ -865,7 +865,7 @@ def launch_browser(host, port, root):
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
logger.error('Could not launch browser: %s' % e)
|
logger.error('Could not launch browser: %s' % e)
|
||||||
|
|
||||||
def config_write:
|
def config_write():
|
||||||
new_config = ConfigObj()
|
new_config = ConfigObj()
|
||||||
new_config.filename = CONFIG_FILE
|
new_config.filename = CONFIG_FILE
|
||||||
|
|
||||||
|
|
|
@ -2819,7 +2819,7 @@ class WebInterface(object):
|
||||||
qd = True
|
qd = True
|
||||||
else:
|
else:
|
||||||
qerror = dom.getElementsByTagName('error')[0].firstChild.wholeText
|
qerror = dom.getElementsByTagName('error')[0].firstChild.wholeText
|
||||||
logger.fdebug(str(qerror) + ' - check that the API (NZBkey) is correct, use the auto-detect option AND/OR check host:port settings')
|
logger.error(str(qerror) + ' - check that the API (NZBkey) is correct, use the auto-detect option AND/OR check host:port settings')
|
||||||
qd = False
|
qd = False
|
||||||
|
|
||||||
if qd == False: return
|
if qd == False: return
|
||||||
|
@ -2827,19 +2827,19 @@ class WebInterface(object):
|
||||||
#test which apikey provided
|
#test which apikey provided
|
||||||
if q_nzbkey != sab_apikey:
|
if q_nzbkey != sab_apikey:
|
||||||
if q_apikey != sab_apikey:
|
if q_apikey != sab_apikey:
|
||||||
logger.fdebug('APIKey provided does not match with SABnzbd')
|
logger.error('APIKey provided does not match with SABnzbd')
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
logger.fdebug('APIKey provided is FULL APIKey which is too much power - changing to NZBKey')
|
logger.info('APIKey provided is FULL APIKey which is too much power - changing to NZBKey')
|
||||||
mylar.SAB_APIKEY = q_nzbkey
|
mylar.SAB_APIKEY = q_nzbkey
|
||||||
mylar.config_write()
|
mylar.config_write()
|
||||||
logger.fdebug('Succcessfully changed to NZBKey. Thanks for shopping S-MART!')
|
logger.info('Succcessfully changed to NZBKey. Thanks for shopping S-MART!')
|
||||||
else:
|
else:
|
||||||
logger.fdebug('APIKey provided is NZBKey which is the correct key.')
|
logger.info('APIKey provided is NZBKey which is the correct key.')
|
||||||
|
|
||||||
logger.fdebug('Connection to SABnzbd tested sucessfully')
|
logger.info('Connection to SABnzbd tested sucessfully')
|
||||||
else:
|
else:
|
||||||
logger.fdebug('You do not have anything stated for SAB Host. Please correct and try again.')
|
logger.error('You do not have anything stated for SAB Host. Please correct and try again.')
|
||||||
return
|
return
|
||||||
SABtest.exposed = True
|
SABtest.exposed = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue