Skip to content

Commit

Permalink
Allow playlist as end preset in playlist.
Browse files Browse the repository at this point in the history
Playlist chaining.
  • Loading branch information
blazoncek committed Oct 6, 2021
1 parent 9f230ae commit 02fcccc
Show file tree
Hide file tree
Showing 3 changed files with 613 additions and 613 deletions.
14 changes: 7 additions & 7 deletions wled00/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,6 @@ function populatePresets(fromls)
let i = is[a];
if (expanded[i+100]) expand(i+100, true);
}
makePlSel(arr);
} else { presetError(true); }
updatePA(true);
populateQL();
Expand Down Expand Up @@ -1359,14 +1358,15 @@ var plJson = {"0":{
"end": 0
}};

var plSelContent = "";
function makePlSel(arr) {
plSelContent = "";
function makePlSel(incPl=false) {
var plSelContent = "";
var arr = Object.entries(pJson);
for (var i = 0; i < arr.length; i++) {
var n = arr[i][1].n ? arr[i][1].n : "Preset " + arr[i][0];
if (arr[i][1].playlist && arr[i][1].playlist.ps) continue; //remove playlists, sub-playlists not yet supported
if (!incPl && arr[i][1].playlist && arr[i][1].playlist.ps) continue; //remove playlists, sub-playlists not yet supported
plSelContent += `<option value=${arr[i][0]}>${n}</option>`
}
return plSelContent;
}

function refreshPlE(p) {
Expand Down Expand Up @@ -1452,7 +1452,7 @@ function makeP(i,pl) {
<div class="sel">End preset:<br>
<select class="sel sel-ple" id="pl${i}selEnd" onchange="plR(${i})" data-val=${plJson[i].end?plJson[i].end:0}>
<option value=0>None</option>
${plSelContent}
${makePlSel(true)}
</select></div>
</div>
<div class="c"><button class="btn btn-p" onclick="testPl(${i}, this)"><i class='icons btn-icon'>&#xe139;</i>Test</button></div>`;
Expand Down Expand Up @@ -1513,7 +1513,7 @@ function makePlEntry(p,i) {
<tr>
<td width="80%" colspan=2>
<select class="sel sel-pl" onchange="plePs(${p},${i},this)" data-val="${plJson[p].ps[i]}" data-index="${i}">
${plSelContent}
${makePlSel()}
</select>
</td>
<td class="c"><button class="btn btn-pl-add" onclick="addPl(${p},${i})"><i class="icons btn-icon">&#xe18a;</i></button></td>
Expand Down
2 changes: 1 addition & 1 deletion wled00/html_simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Autogenerated from wled00/data/simple.htm, do not edit!!
const uint16_t PAGE_simple_L = 28898;
const uint8_t PAGE_simple[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xe4, 0xbd, 0x69, 0x7b, 0xda, 0xc8,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xe4, 0xbd, 0x69, 0x7b, 0xda, 0xc8,
0xb6, 0x30, 0xfa, 0x3d, 0xbf, 0x82, 0x28, 0xbd, 0xd3, 0x28, 0x88, 0x79, 0x88, 0x0d, 0x51, 0x7c,
0x04, 0x06, 0x8f, 0x78, 0x00, 0x63, 0xc7, 0x71, 0x7b, 0xef, 0x57, 0x08, 0x21, 0x64, 0x0b, 0x09,
0x4b, 0x62, 0xb2, 0xcd, 0xfd, 0xed, 0x77, 0xad, 0xaa, 0xd2, 0x04, 0xc2, 0x76, 0xef, 0xb3, 0xcf,
Expand Down
Loading

0 comments on commit 02fcccc

Please sign in to comment.