[Enhance][Bug fix][Doc] ETR for songdb tool & Update notify

- Add support for ETR difficulties in the `update_song.py` tool
- Make content bundle updates mandatory for client
- README update
This commit is contained in:
Lost-MSth
2024-03-17 22:35:52 +08:00
parent 328be5b923
commit a05bb4854d
5 changed files with 25 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ class Config:
SONG_FILE_HASH_PRE_CALCULATE = True
GAME_API_PREFIX = '/saikyoukaze/27' # str | list[str]
GAME_API_PREFIX = '/desks/28' # str | list[str]
OLD_GAME_API_PREFIX = [] # str | list[str]
ALLOW_APPVERSION = [] # list[str]

View File

@@ -0,0 +1,5 @@
## Arcaea Bundle Folder
[Arcaea-Bundler](https://github.com/Lost-MSth/Arcaea-Bundler)
There must be pairs of bundle file and JSON metadata file with the same name. The bundle file's suffix is `.cb` and the metadata file's suffix is `.json`.

View File

@@ -110,9 +110,8 @@ def header_check(request) -> ArcError:
if Config.ALLOW_APPVERSION: # 版本检查
if 'AppVersion' not in headers or headers['AppVersion'] not in Config.ALLOW_APPVERSION:
return LowVersion('Invalid app version', 5)
if 'ContentBundle' in headers and headers['ContentBundle'] != BundleParser.max_bundle_version[headers['AppVersion']]:
return LowVersion('Invalid content bundle version', 11)
if 'ContentBundle' in headers and headers['ContentBundle'] != BundleParser.max_bundle_version[headers['AppVersion']]:
return LowVersion('Invalid content bundle version', 11)
if has_arc_hash and not ArcHashChecker(request).check():
return NoAccess('Invalid request')