finamp icon indicating copy to clipboard operation
finamp copied to clipboard

Shuffle starts on first song

Open drazil100 opened this issue 4 years ago • 16 comments
trafficstars

When opening a playlist or album and pressing the big shuffle button at the top it always starts by playing the first song on the list. It would be great if it started on a random song.

drazil100 avatar Jul 11 '21 23:07 drazil100

This seems to only happen on iOS, so it's probably something to do with the audio package I'm using. I'll look into it.

jmshrv avatar Jul 11 '21 23:07 jmshrv

Should be fixed in 4814a88, I'll test it on iOS in a bit

jmshrv avatar Jul 26 '21 21:07 jmshrv

As I said in #86, 4814a88 didn't work so this issue still isn't fixed.

jmshrv avatar Jul 27 '21 02:07 jmshrv

In my experience this also happens on Android (testing on 5fa8195).

rom4nik avatar Oct 28 '21 02:10 rom4nik

Still happening on android app version 0.5.1

NotFluffy avatar Nov 20 '21 11:11 NotFluffy

Yep

MagicRB avatar Jan 11 '22 13:01 MagicRB

Still an issue on iOS at least in version 0.6.0.

If it's not easy/possible to get the tools you are using to generate a random queue that doesn't start with the top song of the album/playlist, you could have it pick a random song to start playing and then enable shuffle mode after the fact like you do when you enable it from the now playing screen. May not be the best or most ideal solution but the now playing screen shuffle button works perfectly fine.

drazil100 avatar Apr 10 '22 10:04 drazil100

Persisting with 0.6.1 on Android and iOS.

foss- avatar Apr 25 '22 15:04 foss-

This is dependant on https://github.com/ryanheise/just_audio/issues/293

jmshrv avatar May 11 '22 14:05 jmshrv

I still suggest as a workaround to manually randomize what the initial index is before entering shuffle mode. It's a hacky workaround but its better than having to hear the same first song repeatedly every time you shuffle a playlist. Also given it's been almost a year since you posted on that issue I don't expect it to be fixed on their end anytime soon.

drazil100 avatar Jun 05 '22 02:06 drazil100

A better solution would be to skip once, since then you're only missing one song. It's still not a great solution, but it works for now. I could also something like this:

  1. Put the first song in twice
  2. Skip once
  3. Remove the song in the first position

The code for that would look bad but it should be pretty transparent to the user

jmshrv avatar Jun 05 '22 16:06 jmshrv

I don't see a reason to remove it. If you have repeat all enabled it would just become the last song in the shuffle instead of the first.

I am personally on board with this solution for my use case however for shorter playlists (especially if you drop the first song) I think some people might take issue.

drazil100 avatar Jun 06 '22 02:06 drazil100

This may be fixed in 74cfc09, apparently setting the initial index is a bad idea when shuffling lol. I'm going to make a release now, so hopefully you guys can easily test within a few days :)

jmshrv avatar Jun 06 '22 12:06 jmshrv

I'll get back to you as soon as it hits my phone. 👍

drazil100 avatar Jun 06 '22 20:06 drazil100

No luck. Still starts on the first song.

drazil100 avatar Jun 10 '22 20:06 drazil100

I am noticing it seems to start on the first song majority of the time still. Also the randomness of the shuffle seems very poor. I feel it often plays the same few songs first. And if not the first few it still seems to be just poor randomness.

seniorm0ment avatar Sep 13 '22 02:09 seniorm0ment

@seniorm0ment I have noticed the same thing. It feels like a lot of the same songs always play, while new songs rarely play if ever. I thought it was just me, but at this point with over 300 songs in my playlist, I'm not so sure

AdalynBlack avatar Oct 22 '22 21:10 AdalynBlack

I am noticing it seems to start on the first song majority of the time still.

This is a problem I notice as well.

Also the randomness of the shuffle seems very poor. I feel it often plays the same few songs first. And if not the first few it still seems to be just poor randomness.

I didn't check the code, but I suspect this is not actually the problem of the software. This is a widely known problem of human mind not capable of handling randomness properly. Due to this reason, the shuffle in main stream music service, e.g. apple music is specifically designed to avoid similar pattern to create a randomness that feels more random instead of statistically random.

gzqx avatar Feb 17 '23 14:02 gzqx

Can confirm this issue is still present, every time I click shuffle it plays the first song in the playlist. Furthermore it seems if Jellyfin is having trouble loading a song or bugging out a bit it flicks back to that first song. A bit difficult to replicate it so not sure what exactly causes it to flick back to it but when it does it's always in a paused state like its thinking "oh im stuck, not sure what to do. Returning to beginning of playlist, and awaiting user to hit play".

As far as the randomness goes, I don't think that's it. I have some big playlists, while I do get randomization it genuinely just seems poor. Sometimes I will even hear the same song twice in a shuffle a few songs apart when it skipped over the other hundred songs in the playlist.

seniorm0ment avatar Mar 16 '23 03:03 seniorm0ment

I'm considering switching to an MPV-based player sooner rather than later, so hopefully that'll help (see #177)

jmshrv avatar Mar 17 '23 12:03 jmshrv

Hopefully doing so fixes it cause I am tired of the first song in my playlist even though I skip it every time. I'd remove it but then I know I would just get tired of the next song in the list xD

drazil100 avatar Mar 20 '23 00:03 drazil100

haha yeah I can imagine, might add an option to automatically skip as a temporary workaround

jmshrv avatar Mar 20 '23 14:03 jmshrv

The new version just went public on the iOS App Store and I wanted to report that this issue has been resolved. 😀

drazil100 avatar Jul 30 '23 08:07 drazil100