[Enhance] Save unlock? & songlist parser?

- Support more things in full cloud save unlocking and songlist parser
- For Arcaea 5.0.1

> NOTE: May not work well because this client version is not completed and confusing!!
This commit is contained in:
Lost-MSth
2023-09-28 21:48:54 +08:00
parent 5788972692
commit 1f389e4073
7 changed files with 65 additions and 24 deletions

View File

@@ -83,6 +83,7 @@ class SonglistParser:
def parse_one(self, song: dict) -> dict:
'''解析单个歌曲'''
# TODO: byd_local_unlock ???
if not 'id' in song:
return {}
r = 0
@@ -96,11 +97,12 @@ class SonglistParser:
if any(i['ratingClass'] == 3 for i in song.get('difficulties', [])):
r |= 8
if 'additional_files' in song:
if 'video.mp4' in song['additional_files']:
for extra_file in song.get('additional_files', []):
if extra_file['file_name'] == SonglistParser.FILE_NAMES[6]:
r |= 64
if 'video_audio.ogg' in song['additional_files']:
elif extra_file['file_name'] == SonglistParser.FILE_NAMES[7]:
r |= 128
return {song['id']: r}
def parse_one_unlock(self, song: dict) -> None: