mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-16 18:37:23 +08:00
Add: Update check via github web page
- Add no update check if running multiple alas - Fix enable_update_check not working
This commit is contained in:
@@ -236,6 +236,7 @@ def main(ini_name=''):
|
||||
|
||||
update = emulator_parser.add_argument_group('更新检查', '')
|
||||
update.add_argument('--启用更新检查', default=default('--启用更新检查'), choices=['是', '否'])
|
||||
update.add_argument('--update_method', default=default('--update_method'), choices=['api', 'web'], help='')
|
||||
update.add_argument('--github_token', default=default('--github_token'), help='To generate your token visit https://github.com/settings/tokens')
|
||||
update.add_argument('--update_proxy', default=default('--update_proxy'), help='Local http or socks proxy, example: http://127.0.0.1:10809')
|
||||
|
||||
|
||||
@@ -237,6 +237,7 @@ def main(ini_name=''):
|
||||
|
||||
update = emulator_parser.add_argument_group('ALAS Update Check', '')
|
||||
update.add_argument('--enable_update_check', default=default('--enable_update_check'), choices=['yes', 'no'])
|
||||
update.add_argument('--update_method', default=default('--update_method'), choices=['api', 'web'], help='')
|
||||
update.add_argument('--github_token', default=default('--github_token'), help='To generate your token visit https://github.com/settings/tokens')
|
||||
update.add_argument('--update_proxy', default=default('--update_proxy'), help='Local http or socks proxy, example: http://127.0.0.1:10809')
|
||||
|
||||
|
||||
@@ -234,6 +234,7 @@ def main(ini_name=''):
|
||||
|
||||
update = emulator_parser.add_argument_group('ALAS Update Check', '')
|
||||
update.add_argument('--enable_update_check', default=default('--enable_update_check'), choices=['yes', 'no'])
|
||||
update.add_argument('--update_method', default=default('--update_method'), choices=['api', 'web'], help='')
|
||||
update.add_argument('--github_token', default=default('--github_token'), help='To generate your token visit https://github.com/settings/tokens')
|
||||
update.add_argument('--update_proxy', default=default('--update_proxy'), help='Local http or socks proxy, example: http://127.0.0.1:10809')
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ class AzurLaneConfig:
|
||||
start_time = datetime.now()
|
||||
|
||||
UPDATE_CHECK = True
|
||||
UPDATE_METHOD = 'api' # web, api
|
||||
UPDATE_PROXY = ''
|
||||
GITHUB_TOKEN = ''
|
||||
SERVER = server.server
|
||||
@@ -419,8 +420,9 @@ class AzurLaneConfig:
|
||||
self.DEVICE_SCREENSHOT_METHOD = option['device_screenshot_method']
|
||||
self.DEVICE_CONTROL_METHOD = option['device_control_method']
|
||||
self.COMBAT_SCREENSHOT_INTERVAL = float(option['combat_screenshot_interval'])
|
||||
#UpdateCheck
|
||||
# UpdateCheck
|
||||
self.UPDATE_CHECK = to_bool(option['enable_update_check'])
|
||||
self.UPDATE_METHOD = option['update_method']
|
||||
self.UPDATE_PROXY = option['update_proxy']
|
||||
self.GITHUB_TOKEN = option['github_token']
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ dic_true_eng_to_eng = {
|
||||
'enable_event_ab': 'enable_event_ab',
|
||||
'github_token': 'github_token',
|
||||
'update_proxy': 'update_proxy',
|
||||
'update_method': 'update_method',
|
||||
'enable_update_check': 'enable_update_check',
|
||||
'enable_stop_condition': 'enable_stop_condition',
|
||||
'enable_exception': 'enable_exception',
|
||||
@@ -236,6 +237,7 @@ dic_chi_to_eng = {
|
||||
'enable_event_ab': 'enable_event_ab',
|
||||
'github_token': 'github_token',
|
||||
'update_proxy': 'update_proxy',
|
||||
'update_method': 'update_method',
|
||||
'启用更新检查': 'enable_update_check',
|
||||
'启用停止条件': 'enable_stop_condition',
|
||||
'启用异常处理': 'enable_exception',
|
||||
|
||||
Reference in New Issue
Block a user