Skip to content

Commit ab89cd5

Browse files
committed
Start playlist at higher ID if needed due to more effects, from usermods
1 parent 6502733 commit ab89cd5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

wled00/data/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3220,6 +3220,7 @@ function genPresets()
32203220
playlistTrans[m] += playlistSep[m] + "7";
32213221
playlistSep[m] = ",";
32223222
}
3223+
var seq=230; //Playlist start here
32233224
for (let ef of effects) {
32243225
if (ef.name.indexOf("RSVD") < 0) {
32253226
if (Array.isArray(fxdata) && fxdata.length>ef.id) {
@@ -3261,11 +3262,12 @@ function genPresets()
32613262
addToPlaylist("All", ef.id);
32623263
if (m.includes("1")) addToPlaylist("All1", ef.id);
32633264
if (m.includes("2")) addToPlaylist("All2", ef.id);
3265+
3266+
seq = Math.max(seq, (parseInt(ef.id) + 1));
32643267
} //fxdata is array
32653268
} //not RSVD
32663269
} //all effects
32673270

3268-
var seq=230; //Playlist start here
32693271
// console.log(playlistPS, playlistDur, playlistTrans);
32703272
for (const m in playlistPS) {
32713273
let playListString = `\n,"${seq}":{"n":"${m}D Playlist","ql":"${seq}","on":true,"playlist":{"ps":[${playlistPS[m]}],"dur":[${playlistDur[m]}],"transition":[${playlistTrans[m]}],"repeat":0,"end":0,"r":1}}`;

0 commit comments

Comments
 (0)