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 crash and inconsistent ordering when using ShuffleOrderIndexProvider #3250

Merged
merged 1 commit into from
Dec 24, 2023

Conversation

nielsvanvelzen
Copy link
Member

Some issues that probably happened because I was developing the playback rewrite on multiple branches and at some point merging some incompatible stuff came together to create this issue.

Changes

  • Make sure we never set currentMediaItemIndex to 1 when there is no next item in the generated media3 playlist
  • Always use index 0 in replaceQueue as the index mapping (via sortOrder) will give a randomized value already. Setting a random index in replaceQueue will just skip a bunch of queue items
  • Do all value setting in replaceQueue with the coroutineScope to prevent race conditions when the coroutine is delayed
  • Fix ShuffleOrderIndexProvider not really shuffling. The first two items were shuffled but everything after that was just repeating the second item... oops

Issues

Supersedes #3249
Fixes #3248

@nielsvanvelzen nielsvanvelzen added bug Something isn't working playback Issue related to media playback crash Bug causing app crashes labels Dec 24, 2023
@nielsvanvelzen nielsvanvelzen added this to the v0.16.3 milestone Dec 24, 2023
@nielsvanvelzen nielsvanvelzen merged commit b9e19b2 into jellyfin:master Dec 24, 2023
5 checks passed
@nielsvanvelzen nielsvanvelzen deleted the shuffle-fix branch May 4, 2024 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crash Bug causing app crashes playback Issue related to media playback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crashes when playing a shuffled music playlist (new music backend)
2 participants