Suggestion: loop playlist with shuffle
Opened this issue · 1 comments
feyli commented
-
I'm submitting a ...
[ ] feature request -
Summary
It would just be great to have a way to do this:
The radio starts, immediately shuffles the playlist, and plays it. When the playlist ends, the radio shuffles it again and plays it over. It would do this over and over, every time looping another shuffle of the same playlist.
ch1ller0 commented
Hey! Thanks for the suggestion.
Does this code cover your case?
const { SHUFFLE_METHODS } = require('@fridgefm/radio-core')
station.on(PUBLIC_EVENTS.START, () => {
station.reorderPlaylist(SHUFFLE_METHODS.randomShuffle());
});
station.on(PUBLIC_EVENTS.RESTART, () => {
station.reorderPlaylist(SHUFFLE_METHODS.randomShuffle());
});