Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix track restarting when trying to switch track change direction with shuffle active #30215

Merged
merged 4 commits into from
Oct 11, 2024

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Oct 11, 2024

Closes #30190.

Now with more testing. I previously didn't do tests because they were annoying to do (see "ensure nonzero track duration" steps in the tests), which was a costly mistake.

Recommend viewing this diff without whitespace.

@bdach bdach added area:overlay-now-playing next release Pull requests which are almost there. We'll aim to get them in the next release, but no guarantees! labels Oct 11, 2024
@bdach
Copy link
Collaborator Author

bdach commented Oct 11, 2024

Speak of the devil, one of the failing tests is new and it's failing intermittently and I have zero idea where to even begin. I love this.

It was supposed to just be a smoke test against a hard crash so I could remove the assertions I guess but I kinda don't want to?

@peppy peppy self-requested a review October 11, 2024 15:50
@peppy peppy merged commit 3a8ed88 into ppy:master Oct 11, 2024
9 of 13 checks passed
@peppy
Copy link
Member

peppy commented Oct 11, 2024

Hmm, only just saw the flaky test after hitting button.. I guess we can see how often it happens and adjust?

@bdach
Copy link
Collaborator Author

bdach commented Oct 11, 2024

Yeah I'll handle the test if it acts out.

@bdach bdach deleted the fix-music-controller branch October 14, 2024 06:12
bdach added a commit to bdach/osu that referenced this pull request Oct 14, 2024
See ppy#30215 (comment) for
context.

Turns out the test failures were more correct than I'd thought. The
long-and-short of it is that both in "pure random" mode and in
"permutation" mode, when running out of track history to fall
back on, it was possible for the random algorithm to pick the same song
twice in a row - which is probably not desired, and which this explicit
exclude should make impossible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:overlay-now-playing next release Pull requests which are almost there. We'll aim to get them in the next release, but no guarantees! size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forward skip restarts track when preceded by two backwards skips
2 participants