Fix indexing of presets and playlists. (#13543)

Signed-off-by: Matthew Skinner <matt@pcmus.com>
This commit is contained in:
Matthew Skinner 2022-10-15 19:07:49 +11:00 committed by GitHub
parent bdbd5a1ede
commit 90ac9c7b78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,9 +63,9 @@ public class WledApiV0110 extends WledApiV084 {
PresetState preset = gson.fromJson(presetEntry.getValue(), PresetState.class);
if (preset != null && counter > 0) {
if (preset.bri == 0) {
playlistsOptions.add(new StateOption(Integer.toString(counter), preset.n));
playlistsOptions.add(new StateOption(presetEntry.getKey(), preset.n));
} else {
presetsOptions.add(new StateOption(Integer.toString(counter), preset.n));
presetsOptions.add(new StateOption(presetEntry.getKey(), preset.n));
}
}
counter++;