Playlist creation bugfix (preset 0 selected).

This commit is contained in:
Blaz Kristan 2022-11-30 19:34:32 +01:00
parent bd601ad2da
commit 643f300792
3 changed files with 1144 additions and 1147 deletions

View File

@ -17,6 +17,7 @@ var d = document;
var palettesData;
var fxdata = [];
var pJson = {}, eJson = {}, lJson = {};
var plJson = {}; // array of playlists
var pN = "", pI = 0, pNum = 0;
var pmt = 1, pmtLS = 0, pmtLast = 0;
var lastinfo = {};
@ -1698,15 +1699,6 @@ function resetUtil()
+ '<div class="segname" onclick="makeSeg()"><i class="icons btn-icon">&#xe18a;</i>Add segment</div></div>';
}
var plJson = {"0":{
"ps": [0],
"dur": [100],
"transition": [-1], // to be inited to default transition dur
"repeat": 0,
"r": false,
"end": 0
}};
function makePlSel(el, incPl=false) {
var plSelContent = "";
delete pJson["0"]; // remove filler preset
@ -1787,6 +1779,14 @@ function plR(p) {
function makeP(i,pl) {
var content = "";
if (pl) {
if (i===0) plJson[0] = {
ps: [1],
dur: [100],
transition: [tr],
repeat: 0,
r: false,
end: 0
};
var rep = plJson[i].repeat ? plJson[i].repeat : 0;
content =
`<div id="ple${i}" style="margin-top:10px;"></div><label class="check revchkl">Shuffle
@ -1909,7 +1909,6 @@ function makePlUtil()
if (pNum < 2) {
showToast("You need at least 2 presets to make a playlist!"); //return;
}
if (plJson[0].transition[0] < 0) plJson[0].transition[0] = tr;
let p = gId('putil');
p.classList.remove('staybot');
p.classList.add('pres');

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
*/
// version code in format yymmddb (b = daily build)
#define VERSION 2211261
#define VERSION 2211300
//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG