var minisrv_service_file = true; const wtvbgm = new WTVBGMusic(minisrv_config, session_data); var catsListed = 0; var categories = wtvbgm.getCategoryList(); var divide = Math.round(categories.length / 2, 0); 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 ${(categories.length > 14) ? '
' : '
'} Choose the styles you'd like to hear.
Choose a style name to see the songs for that style. ${(categories.length > 14) ? '
' : ''}
`; Object.keys(categories).forEach(function (k) { var catID = categories[k].id; var songsInCat = wtvbgm.getCategorySongList(catID); if (songsInCat.length > 0) { if (catsListed == divide) { data += `
`; } data += `
${categories[k].name}
`; catsListed++; } }); data += `
`;