more BGMusic updates
- update getCategoryList to return obj - 2 custom categories - improved classic support - only tell client to refresh playlist if the playlist has changed - move reset defaults for bgmusic due to autosubmit onleave on category page - rearrange songs: move Lufia Fortress near Lufia Map
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-music/music/vidgame/city.mid
Normal file
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-music/music/vidgame/city.mid
Normal file
Binary file not shown.
Binary file not shown.
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-music/music/vidgame/dkc.mid
Normal file
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-music/music/vidgame/dkc.mid
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-music/music/zefie/cool.mid
Normal file
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-music/music/zefie/cool.mid
Normal file
Binary file not shown.
Binary file not shown.
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-music/music/zefie/new.mid
Normal file
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-music/music/zefie/new.mid
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-music/music/zefie/shout.mid
Normal file
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-music/music/zefie/shout.mid
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-music/music/zefie/weird.mid
Normal file
BIN
zefie_wtvp_minisrv/ServiceVault/wtv-music/music/zefie/weird.mid
Normal file
Binary file not shown.
@@ -3,6 +3,9 @@ var minisrv_service_file = true;
|
||||
var WTVBGMusic = require("./WTVBGMusic.js");
|
||||
var wtvbgm = new WTVBGMusic(minisrv_config, ssid_sessions[socket.ssid])
|
||||
|
||||
var catsListed = 0;
|
||||
var categories = wtvbgm.getCategoryList();
|
||||
var divide = Math.round(categories.length / 2, 0);
|
||||
|
||||
headers = `200 OK
|
||||
Connection: Keep-Alive
|
||||
@@ -51,7 +54,7 @@ Background music styles
|
||||
</td><td colspan="3">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody><tr>
|
||||
<td absheight="80" valign="center">
|
||||
${(categories.length > 14) ? '<td absheight="50" valign="center">' : '<td absheight="80" valign="center">'}
|
||||
<font size="+2" color="E7CE4A"><blackface><shadow>
|
||||
Background music styles
|
||||
</shadow></blackface></font></td></tr><tr><td>
|
||||
@@ -67,14 +70,10 @@ Choose a style name to see the songs for that style.
|
||||
<form action="/validate-bg-song-category">
|
||||
<input type="hidden" autosubmit="onLeave">
|
||||
`;
|
||||
var catsListed = 0;
|
||||
var categories = wtvbgm.getCategoryList();
|
||||
var numCats = categories.length;
|
||||
var divide = Math.round(numCats / 2, 0);
|
||||
|
||||
Object.keys(categories).forEach(function (k) {
|
||||
var pubcat = parseInt(k) + 1;
|
||||
var songsInCat = wtvbgm.getCategorySongList(pubcat);
|
||||
var catID = categories[k].id;
|
||||
var songsInCat = wtvbgm.getCategorySongList(catID);
|
||||
if (songsInCat.length > 0) {
|
||||
if (catsListed == divide) {
|
||||
data += `</td ><td width="20">
|
||||
@@ -83,9 +82,9 @@ Object.keys(categories).forEach(function (k) {
|
||||
data += `<table>
|
||||
<tbody><tr>
|
||||
<td valign="top">
|
||||
<input type="checkbox" name="enableCategory" value=${pubcat}${(wtvbgm.isCategoryEnabled(pubcat)) ? ' checked="checked"' : ''}>
|
||||
<input type="checkbox" name="enableCategory" value=${catID}${(wtvbgm.isCategoryEnabled(catID)) ? ' checked="checked"' : ''}>
|
||||
</td><td valign="bottom">
|
||||
<a href="wtv-setup:/set-bg?category=${pubcat}">${categories[k]}</a><br>
|
||||
<a href="wtv-setup:/set-bg?category=${catID}">${categories[k].name}</a><br>
|
||||
</td></tr></tbody></table>`;
|
||||
catsListed++;
|
||||
}
|
||||
@@ -114,16 +113,10 @@ data += `
|
||||
</td></tr><tr>
|
||||
<td>
|
||||
</td><td colspan="3" valign="top" align="right">
|
||||
<table><tc><td>
|
||||
<form action="wtv-setup:/reset-musicobj">
|
||||
<font size="-1" color="#E7CE4A"><shadow>
|
||||
<input type="SUBMIT" borderimage="file://ROM/Borders/ButtonBorder2.bif" value="Reset to Defaults" name="Reset" usestyle="" width="203">
|
||||
</shadow></font></form></td><td>
|
||||
<form action="wtv-setup:/sound">
|
||||
<font size="-1" color="#E7CE4A"><shadow>
|
||||
<input type="SUBMIT" borderimage="file://ROM/Borders/ButtonBorder2.bif" value="Done" name="Done" usestyle="" width="103">
|
||||
</shadow></font></form>
|
||||
</td></tc></table>
|
||||
</td><td>
|
||||
</td></tr></tbody></table>
|
||||
</display></display></body></html>`;
|
||||
@@ -1,6 +1,6 @@
|
||||
var music_obj = {};
|
||||
ssid_sessions[socket.ssid].setSessionData("wtv-bgmusic", Object.assign({}, music_obj));
|
||||
ssid_sessions[socket.ssid].setSessionData("wtv-bgmusic", music_obj);
|
||||
ssid_sessions[socket.ssid].saveSessionData();
|
||||
headers = `300 OK
|
||||
Location: wtv-setup:/choose-bg-songs`;
|
||||
|
||||
Location: wtv-setup:/choose-bg-songs
|
||||
wtv-backgroundmusic-load-playlist: wtv-setup:/get-playlist`;
|
||||
|
||||
@@ -53,7 +53,7 @@ ${categoryName}
|
||||
</td><td colspan="3">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody><tr>
|
||||
<td absheight="80" valign="center">
|
||||
${(musicList.length > 14) ? '<td absheight="50" valign="center">' : '<td absheight="80" valign="center">'}
|
||||
<font size="+2" color="E7CE4A"><blackface><shadow>
|
||||
${categoryName}
|
||||
</shadow></blackface></font></td></tr><tr><td>
|
||||
@@ -71,8 +71,7 @@ Choose the songs that you'd like to include.
|
||||
<input type="hidden" autosubmit="onLeave">
|
||||
`;
|
||||
var songsListed = 0;
|
||||
var numSongs = musicList.length;
|
||||
var divide = Math.round(numSongs / 2, 0);
|
||||
var divide = Math.round(musicList.length / 2, 0);
|
||||
Object.keys(musicList).forEach(function (k) {
|
||||
if (songsListed == divide) {
|
||||
data += `</td ><td width="20">
|
||||
@@ -82,9 +81,12 @@ Choose the songs that you'd like to include.
|
||||
<tbody><tr>
|
||||
<td valign="top">
|
||||
<input type="checkbox" name="enableSong" value=${musicList[k]['id']}${(wtvbgm.isSongEnabled(musicList[k]['id'])) ? ' checked="checked"' : ''}>
|
||||
</td><td valign="bottom">
|
||||
<a href=${musicList[k]['url']}?wtv-title=${escape(musicList[k]['title'])}>${musicList[k]['title']}</a>
|
||||
</td><td valign="bottom">`;
|
||||
if (musicList[k]['title'].length > 12 && musicList[k]['title'].length < 18) data += `<font size="-1">`;
|
||||
if (musicList[k]['title'].length > 18) data += `<font size="-2">`;
|
||||
data += `<a href=${musicList[k]['url']}?wtv-title=${escape(musicList[k]['title'])}>${musicList[k]['title']}</a>
|
||||
</td></tr></tbody></table>`;
|
||||
if (musicList[k]['title'].length > 12) data += `</font>`;
|
||||
songsListed++;
|
||||
});
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ for ${ssid_sessions[socket.ssid].getSessionData("subscriber_username") || "You"}
|
||||
<TR>
|
||||
<td>
|
||||
<font size="-1">
|
||||
<td WIDTH=150 HEIGHT=244 VALIGN=top ALIGN=left>
|
||||
<td WIDTH=160 HEIGHT=244 VALIGN=top ALIGN=left>
|
||||
<br><font size="-1"><blackface>
|
||||
<img src="ROMCache/BulletArrow.gif" width=6 height=13 valign=absmiddle><spacer type=block width=6 height=1>
|
||||
<a href="wtv-setup:/mail">Mail/Discuss</a><BR>
|
||||
|
||||
@@ -111,7 +111,11 @@ action="client:SetSetupValue" selected &wtv-muzac-on;${canDoMuzac ? '' : 'disabl
|
||||
<TD>
|
||||
<TD COLSPAN=3 VALIGN=top ALIGN=right>
|
||||
<FONT COLOR="#E7CE4A" SIZE=-1><SHADOW>
|
||||
<INPUT name="chooseMusicStyles" value="Choose Music Styles" WIDTH=195 action="wtv-setup:/choose-bg-songs"
|
||||
|
||||
<INPUT name="resetMusicStyles" value="Reset Defaults" WIDTH=145 action="wtv-setup:/reset-musicobj"
|
||||
TYPE=SUBMIT BORDERIMAGE="file://ROM/Borders/ButtonBorder2.bif" NAME="Button1" USESTYLE WIDTH=103>
|
||||
<spacer type=block WIDTH=4 HEIGHT=1>
|
||||
<INPUT name="chooseMusicStyles" value="Choose Music" WIDTH=145 action="wtv-setup:/choose-bg-songs"
|
||||
TYPE=SUBMIT BORDERIMAGE="file://ROM/Borders/ButtonBorder2.bif" NAME="Button1" USESTYLE WIDTH=103>
|
||||
<spacer type=block WIDTH=4 HEIGHT=1>
|
||||
<INPUT name="Done" value="Done" WIDTH=103
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
|
||||
if (request_headers.query && ssid_sessions[socket.ssid]) {
|
||||
|
||||
if (request_headers.request_url.indexOf('?') >= 0) {
|
||||
var category = (request_headers.query.category) ? request_headers.query.category : null;
|
||||
var WTVBGMusic = require("./WTVBGMusic.js");
|
||||
var wtvbgm = new WTVBGMusic(minisrv_config, ssid_sessions[socket.ssid])
|
||||
var music_obj = wtvbgm.getMusicObj();
|
||||
var old_music_obj = Object.assign({}, music_obj);
|
||||
|
||||
if (category == null) music_obj.enableCategories = [];
|
||||
else {
|
||||
@@ -15,13 +16,13 @@ if (request_headers.query && ssid_sessions[socket.ssid]) {
|
||||
if (wtvbgm.getSongCategory(parseInt(music_obj.enableSongs[k])) == parseInt(category)) toRemove.push(k);
|
||||
});
|
||||
toRemove.forEach(function (v) {
|
||||
music_obj.enableSongs.splice(v,1,"");
|
||||
music_obj.enableSongs.splice(v, 1, "");
|
||||
});
|
||||
var newEnableSongs = music_obj.enableSongs.filter(value => Object.keys(value).length !== 0);
|
||||
music_obj.enableSongs = newEnableSongs;
|
||||
}
|
||||
}
|
||||
var qraw = request_headers.request_url.split('?')[1];
|
||||
var qraw = request_headers.request_url.split('?')[1];
|
||||
if (qraw.length > 0) {
|
||||
qraw = qraw.split("&");
|
||||
for (let i = 0; i < qraw.length; i++) {
|
||||
@@ -29,18 +30,26 @@ if (request_headers.query && ssid_sessions[socket.ssid]) {
|
||||
if (qraw_split.length == 2) {
|
||||
var k = qraw_split[0];
|
||||
if (k == "enableCategory") music_obj['enableCategories'].push(unescape(qraw[i].split("=")[1].replace(/\+/g, "%20")));
|
||||
if (k == "enableSong") music_obj['enableSongs'].push(unescape(qraw[i].split("=")[1].replace(/\+/g, "%20")));
|
||||
if (k == "enableSong") music_obj['enableSongs'].push(unescape(qraw[i].split("=")[1].replace(/\+/g, "%20")));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
music_obj.enableCategories = [...new Set(music_obj.enableCategories)];
|
||||
music_obj.enableSongs = [...new Set(music_obj.enableSongs)];
|
||||
ssid_sessions[socket.ssid].setSessionData("wtv-bgmusic", Object.assign({}, music_obj));
|
||||
ssid_sessions[socket.ssid].saveSessionData();
|
||||
headers = `200 OK
|
||||
music_obj.enableCategories = [...new Set(music_obj.enableCategories.filter(value => Object.keys(value).length !== 0))];
|
||||
music_obj.enableSongs = [...new Set(music_obj.enableSongs.filter(value => Object.keys(value).length !== 0))];
|
||||
music_obj = Object.assign({}, music_obj)
|
||||
if ((Object.keys(music_obj.enableCategories).length != Object.keys(old_music_obj.enableCategories).length) || (Object.keys(music_obj.enableSongs).length != Object.keys(old_music_obj.enableSongs).length)) {
|
||||
// something changed
|
||||
ssid_sessions[socket.ssid].setSessionData("wtv-bgmusic", music_obj);
|
||||
ssid_sessions[socket.ssid].saveSessionData();
|
||||
headers = `200 OK
|
||||
Content-type: text/html
|
||||
wtv-backgroundmusic-load-playlist: wtv-setup:/get-playlist`;
|
||||
} else {
|
||||
// nothing changed
|
||||
headers = `200 OK
|
||||
Content-type: text/html`;
|
||||
}
|
||||
} else {
|
||||
var outdata = doErrorPage();
|
||||
headers = outdata[0];
|
||||
|
||||
@@ -18,7 +18,9 @@ class WTVBGMusic {
|
||||
"World",
|
||||
"Upbeat",
|
||||
"Mellow",
|
||||
"Underground"
|
||||
"Underground",
|
||||
"Video Games",
|
||||
"zefie's Choice"
|
||||
]
|
||||
musiclist_classic = {
|
||||
"100": {
|
||||
@@ -420,6 +422,134 @@ class WTVBGMusic {
|
||||
"1108": {
|
||||
"title": "Xess",
|
||||
"url": "wtv-music:\/music\/newmusic\/pop2\/xess.mid"
|
||||
},
|
||||
"1500": {
|
||||
"title": "Stickerbrush Symphony",
|
||||
"url": "wtv-music:\/music\/vidgame\/bramble.mid"
|
||||
},
|
||||
"1501": {
|
||||
"title": "Dearly Beloved",
|
||||
"url": "wtv-music:\/music\/vidgame\/DearlyBeloved.mid"
|
||||
},
|
||||
"1502": {
|
||||
"title": "Night of Fate",
|
||||
"url": "wtv-music:\/music\/vidgame\/NightofFate.mid"
|
||||
},
|
||||
"1503": {
|
||||
"title": "SimCity SNES",
|
||||
"url": "wtv-music:\/music\/vidgame\/city.mid"
|
||||
},
|
||||
"1504": {
|
||||
"title": "Mt. Gagazat",
|
||||
"url": "wtv-music:\/music\/vidgame\/Gagazat_Mt.mid"
|
||||
},
|
||||
"1505": {
|
||||
"title": "Terranigma Remix",
|
||||
"url": "wtv-music:\/music\/vidgame\/Terranigma_Remix.mid"
|
||||
},
|
||||
"1506": {
|
||||
"title": "Lufia World Map",
|
||||
"url": "wtv-music:\/music\/vidgame\/luf1map.mid"
|
||||
},
|
||||
"1507": {
|
||||
"title": "Lufia Doom Fortress",
|
||||
"url": "wtv-music:\/music\/vidgame\/luf1fortress.mid"
|
||||
},
|
||||
"1508": {
|
||||
"title": "Zelda Underworld Remix",
|
||||
"url": "wtv-music:\/music\/vidgame\/Zelda_I_-_Underworld_Theme.mid"
|
||||
},
|
||||
"1509": {
|
||||
"title": "Tetris Theme",
|
||||
"url": "wtv-music:\/music\/vidgame\/tetris.mid"
|
||||
},
|
||||
"1510": {
|
||||
"title": "Sonic 3 Competition",
|
||||
"url": "wtv-music:\/music\/vidgame\/competit.mid"
|
||||
},
|
||||
"1511": {
|
||||
"title": "Balamb Garden",
|
||||
"url": "wtv-music:\/music\/vidgame\/Whatever_FF8_Balamb_GARDEN.mid"
|
||||
},
|
||||
"1512": {
|
||||
"title": "SeeD",
|
||||
"url": "wtv-music:\/music\/vidgame\/Whatever_FF8_SeeD.mid"
|
||||
},
|
||||
"1513": {
|
||||
"title": "Oil Drum Alley",
|
||||
"url": "wtv-music:\/music\/vidgame\/dkc.mid"
|
||||
},
|
||||
"1514": {
|
||||
"title": "The King of Speed",
|
||||
"url": "wtv-music:\/music\/vidgame\/Daytona_USA_-_The_King_of_Speed.mid"
|
||||
},
|
||||
"1515": {
|
||||
"title": "Let's Go Away",
|
||||
"url": "wtv-music:\/music\/vidgame\/Lets_Go_Away-Intermediate_Track.mid"
|
||||
},
|
||||
"1600": {
|
||||
"title": "I Love You Always Forever",
|
||||
"url": "wtv-music:\/music\/zefie\/I_Love_You_Always_Forever.mid"
|
||||
},
|
||||
"1601": {
|
||||
"title": "Only Happy When it Rains",
|
||||
"url": "wtv-music:\/music\/zefie\/only_happy_when_it_rains.mid"
|
||||
},
|
||||
"1602": {
|
||||
"title": "Halloween",
|
||||
"url": "wtv-music:\/music\/zefie\/Halloween.mid"
|
||||
},
|
||||
"1603": {
|
||||
"title": "Cool",
|
||||
"url": "wtv-music:\/music\/zefie\/cool.mid"
|
||||
},
|
||||
"1604": {
|
||||
"title": "Black Celebration",
|
||||
"url": "wtv-music:\/music\/zefie\/gothmusic1.mid"
|
||||
},
|
||||
"1605": {
|
||||
"title": "Save Yourself",
|
||||
"url": "wtv-music:\/music\/zefie\/StabbingWestward_SaveYourself.mid"
|
||||
},
|
||||
"1606": {
|
||||
"title": "Oh Starry Night",
|
||||
"url": "wtv-music:\/music\/zefie\/starnite.mid"
|
||||
},
|
||||
"1607": {
|
||||
"title": "Blue Monday",
|
||||
"url": "wtv-music:\/music\/zefie\/bluemonday.mid"
|
||||
},
|
||||
"1608": {
|
||||
"title": "Another Day in Paradise",
|
||||
"url": "wtv-music:\/music\/zefie\/anotherdayinparadise.mid"
|
||||
},
|
||||
"1609": {
|
||||
"title": "Goin' Down the Fast Way",
|
||||
"url": "wtv-music:\/music\/zefie\/new.mid"
|
||||
},
|
||||
"1610": {
|
||||
"title": "Take On Me",
|
||||
"url": "wtv-music:\/music\/zefie\/takeonme.mid"
|
||||
},
|
||||
"1611": {
|
||||
"title": "Better Off Alone",
|
||||
"url": "wtv-music:\/music\/zefie\/betteroffalone.mid"
|
||||
},
|
||||
"1612": {
|
||||
"title": "Runaway Train",
|
||||
"url": "wtv-music:\/music\/zefie\/RunawayTrain.mid"
|
||||
},
|
||||
"1613": {
|
||||
"title": "Shout",
|
||||
"url": "wtv-music:\/music\/zefie\/shout.mid"
|
||||
},
|
||||
"1614": {
|
||||
"title": "Scatman",
|
||||
"url": "wtv-music:\/music\/zefie\/scatman.mid"
|
||||
},
|
||||
"1615": {
|
||||
"title": "Please Don't Go",
|
||||
"url": "wtv-music:\/music\/zefie\/PleaseDontGo.mid"
|
||||
}
|
||||
};
|
||||
musiclist_rmf = {
|
||||
@@ -982,6 +1112,134 @@ class WTVBGMusic {
|
||||
"1411": {
|
||||
"title": "Shibuya-ku",
|
||||
"url": "wtv-music:\/MusicCache\/headspace\/RMF\/ambient\/shibuya-ku.rmf"
|
||||
},
|
||||
"1500": {
|
||||
"title": "Stickerbrush Symphony",
|
||||
"url": "wtv-music:\/music\/vidgame\/bramble.mid"
|
||||
},
|
||||
"1501": {
|
||||
"title": "Dearly Beloved",
|
||||
"url": "wtv-music:\/music\/vidgame\/DearlyBeloved.mid"
|
||||
},
|
||||
"1502": {
|
||||
"title": "Night of Fate",
|
||||
"url": "wtv-music:\/music\/vidgame\/NightofFate.mid"
|
||||
},
|
||||
"1503": {
|
||||
"title": "SimCity SNES",
|
||||
"url": "wtv-music:\/music\/vidgame\/city.mid"
|
||||
},
|
||||
"1504": {
|
||||
"title": "Mt. Gagazat",
|
||||
"url": "wtv-music:\/music\/vidgame\/Gagazat_Mt.mid"
|
||||
},
|
||||
"1505": {
|
||||
"title": "Terranigma Remix",
|
||||
"url": "wtv-music:\/music\/vidgame\/Terranigma_Remix.mid"
|
||||
},
|
||||
"1506": {
|
||||
"title": "Lufia World Map",
|
||||
"url": "wtv-music:\/music\/vidgame\/luf1map.mid"
|
||||
},
|
||||
"1507": {
|
||||
"title": "Lufia Doom Fortress",
|
||||
"url": "wtv-music:\/music\/vidgame\/luf1fortress.mid"
|
||||
},
|
||||
"1508": {
|
||||
"title": "Zelda Underworld Remix",
|
||||
"url": "wtv-music:\/music\/vidgame\/Zelda_I_-_Underworld_Theme.mid"
|
||||
},
|
||||
"1509": {
|
||||
"title": "Tetris Theme",
|
||||
"url": "wtv-music:\/music\/vidgame\/tetris.mid"
|
||||
},
|
||||
"1510": {
|
||||
"title": "Sonic 3 Competition",
|
||||
"url": "wtv-music:\/music\/vidgame\/competit.mid"
|
||||
},
|
||||
"1511": {
|
||||
"title": "Balamb Garden",
|
||||
"url": "wtv-music:\/music\/vidgame\/Whatever_FF8_Balamb_GARDEN.mid"
|
||||
},
|
||||
"1512": {
|
||||
"title": "SeeD",
|
||||
"url": "wtv-music:\/music\/vidgame\/Whatever_FF8_SeeD.mid"
|
||||
},
|
||||
"1513": {
|
||||
"title": "Oil Drum Alley",
|
||||
"url": "wtv-music:\/music\/vidgame\/dkc.mid"
|
||||
},
|
||||
"1514": {
|
||||
"title": "The King of Speed",
|
||||
"url": "wtv-music:\/music\/vidgame\/Daytona_USA_-_The_King_of_Speed.mid"
|
||||
},
|
||||
"1515": {
|
||||
"title": "Let's Go Away",
|
||||
"url": "wtv-music:\/music\/vidgame\/Lets_Go_Away-Intermediate_Track.mid"
|
||||
},
|
||||
"1600": {
|
||||
"title": "I Love You Always Forever",
|
||||
"url": "wtv-music:\/music\/zefie\/I_Love_You_Always_Forever.mid"
|
||||
},
|
||||
"1601": {
|
||||
"title": "Only Happy When it Rains",
|
||||
"url": "wtv-music:\/music\/zefie\/only_happy_when_it_rains.mid"
|
||||
},
|
||||
"1602": {
|
||||
"title": "Halloween",
|
||||
"url": "wtv-music:\/music\/zefie\/Halloween.mid"
|
||||
},
|
||||
"1603": {
|
||||
"title": "Cool",
|
||||
"url": "wtv-music:\/music\/zefie\/cool.mid"
|
||||
},
|
||||
"1604": {
|
||||
"title": "Black Celebration",
|
||||
"url": "wtv-music:\/music\/zefie\/gothmusic1.mid"
|
||||
},
|
||||
"1605": {
|
||||
"title": "Save Yourself",
|
||||
"url": "wtv-music:\/music\/zefie\/StabbingWestward_SaveYourself.mid"
|
||||
},
|
||||
"1606": {
|
||||
"title": "Oh Starry Night",
|
||||
"url": "wtv-music:\/music\/zefie\/starnite.mid"
|
||||
},
|
||||
"1607": {
|
||||
"title": "Blue Monday",
|
||||
"url": "wtv-music:\/music\/zefie\/bluemonday.mid"
|
||||
},
|
||||
"1608": {
|
||||
"title": "Another Day in Paradise",
|
||||
"url": "wtv-music:\/music\/zefie\/anotherdayinparadise.mid"
|
||||
},
|
||||
"1609": {
|
||||
"title": "Goin' Down the Fast Way",
|
||||
"url": "wtv-music:\/music\/zefie\/new.mid"
|
||||
},
|
||||
"1610": {
|
||||
"title": "Take On Me",
|
||||
"url": "wtv-music:\/music\/zefie\/takeonme.mid"
|
||||
},
|
||||
"1611": {
|
||||
"title": "Better Off Alone",
|
||||
"url": "wtv-music:\/music\/zefie\/betteroffalone.mid"
|
||||
},
|
||||
"1612": {
|
||||
"title": "Runaway Train",
|
||||
"url": "wtv-music:\/music\/zefie\/RunawayTrain.mid"
|
||||
},
|
||||
"1613": {
|
||||
"title": "Shout",
|
||||
"url": "wtv-music:\/music\/zefie\/shout.mid"
|
||||
},
|
||||
"1614": {
|
||||
"title": "Scatman",
|
||||
"url": "wtv-music:\/music\/zefie\/scatman.mid"
|
||||
},
|
||||
"1615": {
|
||||
"title": "Weird",
|
||||
"url": "wtv-music:\/music\/zefie\/weird.mid"
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1009,7 +1267,7 @@ class WTVBGMusic {
|
||||
// set up defaults
|
||||
if (this.session_data.hasCap("client-can-do-rmf")) {
|
||||
// rmf
|
||||
music_obj.enableCategories = ["1", "2", "3", "7", "12", "13"];
|
||||
music_obj.enableCategories = ["1", "2", "3", "7", "12", "13", "15", "16"];
|
||||
music_obj.enableSongs = [
|
||||
"100", "101", "102", "104", "107", "109",
|
||||
"205", "206", "207", "211",
|
||||
@@ -1024,11 +1282,13 @@ class WTVBGMusic {
|
||||
"1100", "1101", "1102", "1103", "1104",
|
||||
"1201", "1202", "1203", "1204",
|
||||
"1300", "1302",
|
||||
"1400", "1401"
|
||||
"1400", "1401",
|
||||
"1500", "1503", "1505", "1507", "1511", "1513", "1514",
|
||||
"1600", "1603", "1607", "1609", "1612", "1614"
|
||||
];
|
||||
} else {
|
||||
// classic
|
||||
music_obj.enableCategories = ["1", "2", "8"];
|
||||
music_obj.enableCategories = ["1", "2", "8", "15", "16"];
|
||||
music_obj.enableSongs = [
|
||||
"100", "101", "102", "104",
|
||||
"200", "205", "207", "209", "211",
|
||||
@@ -1040,10 +1300,12 @@ class WTVBGMusic {
|
||||
"800", "801", "802", "803", "804",
|
||||
"900", "901", "902", "903", "904",
|
||||
"1000", "1002", "1004", "1005", "1006",
|
||||
"1100", "1101", "1102", "1103", "1104"
|
||||
"1100", "1101", "1102", "1103", "1104",
|
||||
"1500", "1503", "1505", "1507", "1511", "1513", "1514",
|
||||
"1600", "1603", "1607", "1609", "1612", "1614"
|
||||
];
|
||||
}
|
||||
this.session_data.setSessionData("wtv-bgmusic", Object.assign({}, music_obj));
|
||||
this.session_data.setSessionData("wtv-bgmusic", music_obj);
|
||||
this.session_data.saveSessionData();
|
||||
}
|
||||
return music_obj;
|
||||
@@ -1101,13 +1363,15 @@ class WTVBGMusic {
|
||||
}
|
||||
|
||||
getCategoryList() {
|
||||
var categories = [];
|
||||
var enabledCategories = [];
|
||||
var self = this;
|
||||
Object.keys(self.categories).forEach(function (k) {
|
||||
var songList = self.getCategorySongList(parseInt(k) + 1);
|
||||
if (songList.length > 0) categories[k] = self.categories[k];
|
||||
if (songList.length > 0) enabledCategories.push({
|
||||
"id": parseInt(k) + 1, "name": self.categories[k]
|
||||
});
|
||||
});
|
||||
return categories.filter(value => Object.keys(value).length !== 0);
|
||||
return enabledCategories.filter(value => Object.keys(value.name).length !== 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user