1
0
forked from Hay1tsme/artemis

mai2: GetUserMusicApi hotfix

This commit is contained in:
Hay1tsme 2023-06-13 22:10:35 -04:00
parent 5ca16f2067
commit 5a35b1c823

View File

@ -660,6 +660,7 @@ class Mai2Base:
upper_lim = next_index + max_ct upper_lim = next_index + max_ct
num_user_songs = len(songs) num_user_songs = len(songs)
for x in range(next_index, upper_lim): for x in range(next_index, upper_lim):
if num_user_songs >= x: if num_user_songs >= x:
break break
@ -669,7 +670,7 @@ class Mai2Base:
tmp.pop("user") tmp.pop("user")
music_detail_list.append(tmp) music_detail_list.append(tmp)
next_index = 0 if len(music_detail_list) < max_ct else upper_lim next_index = 0 if len(music_detail_list) < max_ct or num_user_songs == upper_lim else upper_lim
return { return {
"userId": data["userId"], "userId": data["userId"],
"nextIndex": next_index, "nextIndex": next_index,