jcorporation / myMPD

myMPD is a standalone and mobile friendly web mpd client with a tiny footprint and advanced features.
https://jcorporation.github.io/myMPD/
GNU General Public License v3.0
418 stars 65 forks source link

Prevent Jukebox starving condition from uniqueness parameter #273

Closed thaihugo closed 4 years ago

thaihugo commented 4 years ago

Hello,

As discussed in this issue https://github.com/jcorporation/myMPD/issues/269#issuecomment-636253231, there might be an issue with playlists drying off if uniqueness parameter is set.

What is the expected result: Jukebox always have a song available from the selected playlist and will play continuously.

What can prevent this: Small playlists with few different albums or artists, and with uniqueness parameter set on albums or artists. In this case, jukebox will starve quickly as it only have a few songs to select from. This situation normally doesn't occurs from a smart user setting, but using the timers can make the playlist switch without user interaction.

User case scenario: Wanting a timer to play a user playlist, but having the program set most of the time on database setting with uniqueness enforced.

Ideas for solution:

jcorporation commented 4 years ago
jcorporation commented 4 years ago

In the v5.6.0 branch the jukebox disables the unique parameters temporarily if unique parameters can't be fulfilled. Changing any jukebox parameter resets this temporary parameter.