forked from Hay1tsme/artemis
Merge pull request 'Fix issue in handle_get_user_music_api_request for Chunithm where songs would not always return all scores' (#92) from Kumubou/artemis:develop into develop
Reviewed-on: Hay1tsme/artemis#92
This commit is contained in:
commit
c9dfbc77c4
@ -608,16 +608,14 @@ class ChuniBase:
|
|||||||
if len(song_list) >= max_ct:
|
if len(song_list) >= max_ct:
|
||||||
break
|
break
|
||||||
|
|
||||||
try:
|
for songIdx in range(len(song_list)):
|
||||||
while song_list[-1]["userMusicDetailList"][0]["musicId"] == music_detail[x + 1]["musicId"]:
|
for recordIdx in range(x+1, len(music_detail)):
|
||||||
music = music_detail[x + 1]._asdict()
|
if song_list[songIdx]["userMusicDetailList"][0]["musicId"] == music_detail[recordIdx]["musicId"]:
|
||||||
music.pop("user")
|
music = music_detail[recordIdx]._asdict()
|
||||||
music.pop("id")
|
music.pop("user")
|
||||||
song_list[-1]["userMusicDetailList"].append(music)
|
music.pop("id")
|
||||||
song_list[-1]["length"] += 1
|
song_list[songIdx]["userMusicDetailList"].append(music)
|
||||||
x += 1
|
song_list[songIdx]["length"] += 1
|
||||||
except IndexError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if len(song_list) >= max_ct:
|
if len(song_list) >= max_ct:
|
||||||
next_idx += len(song_list)
|
next_idx += len(song_list)
|
||||||
|
Loading…
Reference in New Issue
Block a user