Correct Playlist vs Preset detection (#16146)

Signed-off-by: Matthew Skinner <matt@pcmus.com>
This commit is contained in:
Matthew Skinner 2024-01-01 02:49:50 +11:00 committed by GitHub
parent ca7d3b99c1
commit 706ae58323
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ public class WledApiV0110 extends WledApiV084 {
logger.trace("Preset:{} json:{}", presetEntry.getKey(), presetEntry.getValue());
PresetState preset = gson.fromJson(presetEntry.getValue(), PresetState.class);
if (preset != null && counter > 0) {
if (preset.bri == 0) {
if (presetEntry.getValue().toString().contains("playlist")) {
playlistsOptions.add(new StateOption(presetEntry.getKey(), preset.n));
} else {
presetsOptions.add(new StateOption(presetEntry.getKey(), preset.n));