1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-18 16:11:29 +08:00

Add: an upload API to AzurStat for CN users

This commit is contained in:
SarContDeli
2022-05-20 22:03:40 +08:00
parent 7db5af2a88
commit 67db84b7e0
11 changed files with 69 additions and 16 deletions

View File

@@ -6,6 +6,7 @@ from cached_property import cached_property
from deploy.utils import DEPLOY_TEMPLATE, poor_yaml_read, poor_yaml_write
from module.base.timer import timer
from module.config.redirect_utils.shop_filter import bp_redirect
from module.config.redirect_utils.utils import upload_redirect, api_redirect
from module.config.server import to_server, to_package, VALID_PACKAGE, VALID_CHANNEL_PACKAGE
from module.config.utils import *
@@ -420,20 +421,6 @@ class ConfigGenerator:
self.generate_deploy_template()
def upload_redirect(value):
"""
redirect attr about upload.
"""
if not value[0] and not value[1]:
return 'do_not'
elif value[0] and not value[1]:
return 'save'
elif not value[0] and value[1]:
return 'upload'
else:
return 'save_and_upload'
class ConfigUpdater:
# source, target, (optional)convert_func
redirection = [
@@ -450,6 +437,7 @@ class ConfigUpdater:
'Alas.DropRecord.OpsiRecord', upload_redirect),
(('Alas.DropRecord.SaveMeowfficerTalent', 'Alas.DropRecord.UploadMeowfficerTalent'),
'Alas.DropRecord.MeowfficerTalent', upload_redirect),
('Alas.Emulator.PackageName', 'Alas.DropRecord.API', api_redirect)
]
@cached_property