mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Fix: Set server before run any script
This commit is contained in:
parent
e84f7c3153
commit
35a02d6d30
5
gui.py
5
gui.py
@ -21,6 +21,7 @@ from pywebio.session import go_app, info, register_thread, run_js, set_env
|
||||
from module.logger import logger # Change folder
|
||||
|
||||
import module.webui.lang as lang
|
||||
import module.config.server as server
|
||||
from module.config.config import AzurLaneConfig, Function
|
||||
from module.config.config_updater import ConfigUpdater
|
||||
from module.config.utils import (alas_instance, deep_get, deep_iter, deep_set,
|
||||
@ -105,6 +106,10 @@ class AlasManager:
|
||||
webconsole.setFormatter(formatter)
|
||||
logging.getLogger('alas').addHandler(webconsole)
|
||||
|
||||
# Set server before loading any buttons.
|
||||
config = AzurLaneConfig(config_name=config_name)
|
||||
server.server = deep_get(config.data, keys='Alas.Emulator.Server', default='cn')
|
||||
|
||||
# Run alas
|
||||
if func == 'Alas':
|
||||
from alas import AzurLaneAutoScript
|
||||
|
||||
Loading…
Reference in New Issue
Block a user