From 11a1ce4a6c6d7219bd902337ff2bdc111bee719e Mon Sep 17 00:00:00 2001 From: ShyPike Date: Sat, 12 May 2012 16:04:04 +0200 Subject: [PATCH] Set UI-ready flag sooner. --- SABnzbd.py | 6 ++---- sabnzbd/api.py | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/SABnzbd.py b/SABnzbd.py index fc4f693..9af740c 100755 --- a/SABnzbd.py +++ b/SABnzbd.py @@ -538,7 +538,7 @@ def ipv_localhost(v): return True elif v == '6' and ':' in item: return True - return False + return False #------------------------------------------------------------------------------ def get_webhost(cherryhost, cherryport, https_port): @@ -549,7 +549,7 @@ def get_webhost(cherryhost, cherryport, https_port): cherryhost = '' elif cherryhost == '::' and not ipv_localhost('6'): cherryhost = '' - + if cherryhost is None: cherryhost = sabnzbd.cfg.cherryhost() else: @@ -1483,8 +1483,6 @@ def main(): # Wait for server to become ready cherrypy.engine.wait(cherrypy.process.wspbus.states.STARTED) - sabnzbd.WEBUI_READY = True - if enable_https: browser_url = "https://%s:%s/sabnzbd" % (browserhost, cherryport) else: diff --git a/sabnzbd/api.py b/sabnzbd/api.py index b87ef95..044d6dd 100644 --- a/sabnzbd/api.py +++ b/sabnzbd/api.py @@ -1534,6 +1534,7 @@ def clear_trans_cache(): dummy = _SKIN_CACHE _SKIN_CACHE = {} del dummy + sabnzbd.WEBUI_READY = True logging.debug('Cleared translation cache')