[Bug Fix][Enhance] Endless loop & waitress log

- Fix a bug due to 6fcca17918 that there is a endless loop in calculating recent 10 updating

- Add info log for `waitress`
This commit is contained in:
Lost-MSth
2022-11-05 21:17:44 +08:00
parent 78d28f8886
commit 4a5083c597
5 changed files with 20 additions and 12 deletions

View File

@@ -380,12 +380,12 @@ class UserPlay(UserScore):
r30_id = 29
elif self.song.song_id_difficulty in songs and n == 10:
i = 29
while self.ptt.s30[i] == self.song.song_id_difficulty:
while self.ptt.s30[i] == self.song.song_id_difficulty and i > 0:
i -= 1
r30_id = i
elif self.song.song_id_difficulty not in songs and n == 9:
i = 29
while self.ptt.s30.count(self.ptt.s30[-1]) == 1:
while self.ptt.s30.count(self.ptt.s30[i]) == 1 and i > 0:
i -= 1
r30_id = i
else: