lrkrol / Noctifer-Music

PHP HTML5 music player for self-hosted online libraries
GNU General Public License v3.0
56 stars 16 forks source link

Shuffle does not seem to work with folders having a large number (hundreds) of songs #17

Open MotyerJM opened 4 months ago

MotyerJM commented 4 months ago

Hello, Laurens, this is a fantastic script. Thank you.

This is not a bug report, more like a question: Is there a maximum number of songs that we can have in a single folder?

I have not tested to see at what quantity of songs this problem starts to happen, but I have a folder with 300+ songs, and the Shuffle no longer works. If I enable Shuffle and then start to play a song, when that song finishes, the Shuffle automatically disables every time after that song finishes, and no further songs play. With folders with just a few dozen songs, this problem does not happen and Shuffle works perfectly.

The reason why I have a folder with such a large number of songs, eventually containing perhaps a thousand or more songs, is that I wish to play (shuffled) almost all songs in my collection that are spread out over multiple albums (folders), but unfortunately there is no way that I can add albums (folders) to the Playlist, only individual songs, which would require individually adding a thousand or more songs ;-).

Thank you in advance and have yourself a great day.

Regards, John

MotyerJM commented 4 months ago

I've just discovered that in folders with only 16 songs, that when a song is playing with Shuffle enabled, after that song finishes, Shuffle automatically turns off and no further songs play. So maybe my Shuffle problem is not related to the number of files in the folder, but because of another reason (maybe the characters in my filenames?).

I forgot to provide the link to my Noctifer-Music installation, which is HERE.

Thanks in advance.

John

lrkrol commented 4 months ago

Dear John,

That it's specific to the shuffle function sounds a bit mysterious. When I tried on your own server, going to Albums / 60s Classics Ultimate Collection, starting a song, switching on shuffle, and waiting for the next song to start, the shuffle works as expected: the next song was a random one from the same folder, shuffle remains on, and the song after that is also a randomly picked one.

However, when I try to play something from Assorted folder, whch has a large number of songs, I cannot even play a single song, getting an ERR_HTTP2_PROTOCOL_ERROR instead. This sounds like it may be related to issue #15, but it's not specific to shuffle.

Since all settings are saved in cookies, is it possible you have an automatic cookie-cleaning setting enabled?

Cheers!