Improve playlist generation with more user friendly QuickLoad names and also create playlist for AnimARTrix - if present
This commit is contained in:
@@ -3210,7 +3210,8 @@ function genPresets()
|
|||||||
var playlistSep = JSON.parse("{}");
|
var playlistSep = JSON.parse("{}");
|
||||||
var playlistDur = JSON.parse("{}");
|
var playlistDur = JSON.parse("{}");
|
||||||
var playlistTrans = JSON.parse("{}");
|
var playlistTrans = JSON.parse("{}");
|
||||||
function addToPlaylist(m, id) {
|
var playlistQL = JSON.parse("{}");
|
||||||
|
function addToPlaylist(m, id, ql = undefined) {
|
||||||
if (!playlistPS[m]) playlistPS[m] = "";
|
if (!playlistPS[m]) playlistPS[m] = "";
|
||||||
if (!playlistDur[m]) playlistDur[m] = "";
|
if (!playlistDur[m]) playlistDur[m] = "";
|
||||||
if (!playlistTrans[m]) playlistTrans[m] = "";
|
if (!playlistTrans[m]) playlistTrans[m] = "";
|
||||||
@@ -3219,6 +3220,7 @@ function genPresets()
|
|||||||
playlistDur[m] += playlistSep[m] + "100";
|
playlistDur[m] += playlistSep[m] + "100";
|
||||||
playlistTrans[m] += playlistSep[m] + "7";
|
playlistTrans[m] += playlistSep[m] + "7";
|
||||||
playlistSep[m] = ",";
|
playlistSep[m] = ",";
|
||||||
|
if(ql) playlistQL[m] = `${ql}`;
|
||||||
}
|
}
|
||||||
var seq=230; //Playlist start here
|
var seq=230; //Playlist start here
|
||||||
for (let ef of effects) {
|
for (let ef of effects) {
|
||||||
@@ -3258,10 +3260,16 @@ function genPresets()
|
|||||||
}
|
}
|
||||||
result += `${sep}"${ef.id}":{"n":"${ef.name}","mainseg":0,"seg":[{"id":0,"fx":${ef.id}${defaultString}}]}`;
|
result += `${sep}"${ef.id}":{"n":"${ef.name}","mainseg":0,"seg":[{"id":0,"fx":${ef.id}${defaultString}}]}`;
|
||||||
sep = "\n,";
|
sep = "\n,";
|
||||||
addToPlaylist(m, ef.id);
|
if(m.length <= 3) {
|
||||||
addToPlaylist("All", ef.id);
|
addToPlaylist(m, ef.id, m);
|
||||||
if (m.includes("1")) addToPlaylist("All1", ef.id);
|
}
|
||||||
if (m.includes("2")) addToPlaylist("All2", ef.id);
|
else {
|
||||||
|
addToPlaylist(m, ef.id);
|
||||||
|
}
|
||||||
|
addToPlaylist("All", ef.id, "ALL");
|
||||||
|
if(ef.name.startsWith("Y💡")) addToPlaylist("AnimARTrix", ef.id, "AM");
|
||||||
|
if (m.includes("1")) addToPlaylist("All 1D", ef.id, "1D");
|
||||||
|
if (m.includes("2")) addToPlaylist("All 2D", ef.id, "2D");
|
||||||
|
|
||||||
seq = Math.max(seq, (parseInt(ef.id) + 1));
|
seq = Math.max(seq, (parseInt(ef.id) + 1));
|
||||||
} //fxdata is array
|
} //fxdata is array
|
||||||
@@ -3270,7 +3278,8 @@ function genPresets()
|
|||||||
|
|
||||||
// console.log(playlistPS, playlistDur, playlistTrans);
|
// console.log(playlistPS, playlistDur, playlistTrans);
|
||||||
for (const m in playlistPS) {
|
for (const m in playlistPS) {
|
||||||
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}}`;
|
if(!playlistQL[m]) playlistQL[m] = seq;
|
||||||
|
let playListString = `\n,"${seq}":{"n":"${m} Playlist","ql":"${playlistQL[m]}","on":true,"playlist":{"ps":[${playlistPS[m]}],"dur":[${playlistDur[m]}],"transition":[${playlistTrans[m]}],"repeat":0,"end":0,"r":1}}`;
|
||||||
// console.log(playListString);
|
// console.log(playListString);
|
||||||
result += playListString;
|
result += playListString;
|
||||||
seq++;
|
seq++;
|
||||||
|
|||||||
Reference in New Issue
Block a user