-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Fixed the shuffle behavior #423
Conversation
Also now allows the user to change the order even when shuffling
Firstly, thank you for contributing to SimpMusic. If you check out "Load more" flow in app, your changed code is only affected to all song which showed in Playlist Page, but all song weren't loaded and they not be shuffle. Did you try to open a local playlist with more than 50 tracks, and did they shuffled? |
Ah, I see. I tried it just now with an 58 song local playlist and with my new code, the first 50 songs get shuffled together and the last 8 songs are shuffled with eachother and put at the end of the queue. I'm pretty sure that it works fine with a non local playlist though. I guess I you have a solution, you can try to fix it. Otherwise you can close the PR and Ill make a new one if I find a fix. |
I closed the PR because :
I don't know your code enough to find and update the "Load more" flow, so maybe that's something you can do ? That would be a great improvement, for sure. |
Because every load is loading 50 songs per time and I don't know how to shuffle all the database |
The loadMore function is in SharedViewModel |
Hi, To shuffle the data from a table you could do a select ordered by random: |
Hello,
I noticed that the shuffle behavior was different from a normal music app. Instead of creating a randomized queue and playing the songs in the shown order, the app would keep the playlist order in the queue and simply randomize the queue playing order. I made it so the songs of a playlist are now randomized once and then the queue plays in order. This allows the user to see what song is next and change the order if the wish to.
This relates to issue #65 (8/31) :
Display now playing queue in playing order (for ex. if shuffle)
PS :
It seems like the auto formating from android studio changed a lot of spaces in the code. Sorry if that makes it harder to see the important lines.