forked from Dniel97/artemis
mai2: GetUserMusicApi hotfix
This commit is contained in:
parent
5ca16f2067
commit
5a35b1c823
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user