var minisrv_service_file = true; var WTVBGMusic = require("./WTVBGMusic.js"); var wtvbgm = new WTVBGMusic(minisrv_config, ssid_sessions[socket.ssid]) headers = `200 OK Connection: Keep-Alive wtv-expire-all: wtv- wtv-expire-all: http Content-Type: text/html` data = ` Background music styles
Background music styles
Choose the styles you'd like to hear. Choose a style name to see the songs for that style.
`; 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); if (songsInCat.length > 0) { if (catsListed == divide) { data += `
`; } data += `
${categories[k]}
`; catsListed++; } }); data += `
`;