From 52a189cdd25cbe4c18c9d0cfd982ca4b21de21de Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sat, 4 Feb 2023 10:56:07 +0100 Subject: [PATCH] Playlist bugfix. - another attempt at #3058 --- wled00/playlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/playlist.cpp b/wled00/playlist.cpp index 98aab345..d74ac5a3 100644 --- a/wled00/playlist.cpp +++ b/wled00/playlist.cpp @@ -156,7 +156,7 @@ void serializePlaylist(JsonObject sObj) { JsonArray ps = playlist.createNestedArray("ps"); JsonArray dur = playlist.createNestedArray("dur"); JsonArray transition = playlist.createNestedArray(F("transition")); - playlist[F("repeat")] = (playlistRepeat > 0) ? playlistRepeat - 1 : 0; // remove added repetition count + playlist[F("repeat")] = (playlistIndex < 0) ? playlistRepeat - 1 : playlistRepeat; // remove added repetition count (if not yet running) playlist["end"] = playlistEndPreset; playlist["r"] = playlistOptions & PL_OPTION_SHUFFLE; for (int i=0; i