[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