1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-14 14:49:25 +08:00

Opt: Modified the options for all screenshots

This commit is contained in:
SarContDeli
2022-05-21 00:53:37 +08:00
parent 67db84b7e0
commit dd66c8f289
20 changed files with 117 additions and 92 deletions

View File

@@ -2,14 +2,20 @@ 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'
if isinstance(value, tuple):
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'
else:
return 'save_and_upload'
if not value:
return 'do_not'
else:
return 'save'
def api_redirect(value):
@@ -23,4 +29,4 @@ def api_redirect(value):
value != 'auto':
return 'cn_reverse_proxy'
else:
return 'normal'
return 'default'