Chunithm: Fix getUserMusic duplicate songs and fix missing song diffs #54

Merged
Midorica merged 2 commits from DSRLIN/artemis-bugfix:develop into develop 2023-10-27 01:51:45 +00:00
Contributor

The missing song diffs bugfix is the code between line 603 to line 615.


The original code will cause each page's last song only insert once.


e.g. if you played songId 2023's diff 0, diff 1, diff 2, diff 3, then after insert diff 0 to the song list, the code will go to if len(song_list) >= max_ct: next_idx += len(song_list) part, ignoring diff 1 to 3. the modified code will add all diffs for the last element for the list.


I've tested this on my server with 4 accounts, each with 1000+ play bests. And the code seems works fine.


Also contains #45.

The missing song diffs bugfix is the code between line 603 to line 615. <br> The original code will cause each page's last song only insert once. <br> e.g. if you played songId 2023's diff 0, diff 1, diff 2, diff 3, then after insert diff 0 to the song list, the code will go to if len(song_list) >= max_ct: next_idx += len(song_list) part, ignoring diff 1 to 3. the modified code will add all diffs for the last element for the list. <br> I've tested this on my server with 4 accounts, each with 1000+ play bests. And the code seems works fine. <br> Also contains https://gitea.tendokyu.moe/Hay1tsme/artemis/issues/45.
DSRLIN added 2 commits 2023-10-26 05:45:02 +00:00
Collaborator

Hello,

As discussed in the issue reported, this PR has been tested and works quite nicely and fixed the bug I've seen with duplicated loaded IDs on my own server.

Thank you!

Hello, As discussed in the issue reported, this PR has been tested and works quite nicely and fixed the bug I've seen with duplicated loaded IDs on my own server. Thank you!
Midorica merged commit 1b5c335f4e into develop 2023-10-27 01:51:45 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Hay1tsme/artemis#54
No description provided.