mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-10 10:47:09 +08:00
Opt: Use existing to_server() function
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
from module.config.server import to_server
|
||||||
|
|
||||||
|
|
||||||
def upload_redirect(value):
|
def upload_redirect(value):
|
||||||
"""
|
"""
|
||||||
redirect attr about upload.
|
redirect attr about upload.
|
||||||
@@ -22,13 +25,9 @@ def api_redirect(value):
|
|||||||
"""
|
"""
|
||||||
redirect attr about api.
|
redirect attr about api.
|
||||||
"""
|
"""
|
||||||
if value not in [
|
if value == 'auto':
|
||||||
'auto',
|
return 'default'
|
||||||
'com.YoStarEN.AzurLane',
|
elif to_server(value) == 'cn':
|
||||||
'com.YoStarJP.AzurLane',
|
|
||||||
'com.hkmanjuu.azurlane.gp.mc',
|
|
||||||
'com.hkmanjuu.azurlane.gp',
|
|
||||||
]:
|
|
||||||
return 'cn_gz_reverse_proxy'
|
return 'cn_gz_reverse_proxy'
|
||||||
else:
|
else:
|
||||||
return 'default'
|
return 'default'
|
||||||
|
|||||||
Reference in New Issue
Block a user