Playlist random

This commit is contained in:
Patrick Haßel 2025-06-06 14:20:40 +02:00
parent fbb800c472
commit c6134af272

View File

@ -105,6 +105,9 @@ Entry playlistCurrent() {
} }
Entry playlistNext(const int amount) { Entry playlistNext(const int amount) {
if (playlistRandom) {
return playlistSet(random(static_cast<long>(playlistEntries.size())));
}
if (amount < 0 && playlistIndex <= 0 && !playlistRepeatAll) { if (amount < 0 && playlistIndex <= 0 && !playlistRepeatAll) {
return Entry(); return Entry();
} }