[Bug fix] video download error with songlist

- Fix a bug that the video files cannot be downloaded when
the `songlist` file exists. #177
This commit is contained in:
Lost-MSth
2024-06-14 23:47:52 +08:00
parent dd0bc64c93
commit 64526e3c4b
2 changed files with 5 additions and 5 deletions

View File

@@ -47,8 +47,8 @@ class SonglistParser:
# songlist没有则只限制文件名
return file_name in SonglistParser.FILE_NAMES
rule = SonglistParser.songs[song_id]
for i in range(10):
if file_name == SonglistParser.FILE_NAMES[i] and rule & (1 << i) != 0:
for i, v in enumerate(SonglistParser.FILE_NAMES):
if file_name == v and rule & (1 << i) != 0:
return True
return False

View File

@@ -660,9 +660,9 @@ class BaseWorldPlay(WorldSkillMixin):
},
"char_stats": {
"character_id": self.character_used.character_id,
"frag": self.character_used.frag.get_value(self.character_used.level),
"prog": self.character_used.prog.get_value(self.character_used.level),
"overdrive": self.character_used.overdrive.get_value(self.character_used.level)
"frag": self.character_used.frag_value,
"prog": self.character_used.prog_value,
"overdrive": self.character_used.overdrive_value
},
"current_stamina": self.user.stamina.stamina,
"max_stamina_ts": self.user.stamina.max_stamina_ts,