fix wtv-setup incorrect optimizations

This commit is contained in:
zefie
2025-08-12 16:41:53 -04:00
parent dcb8b72c1b
commit 733200c897
10 changed files with 25 additions and 27 deletions

View File

@@ -1,4 +1,4 @@
var minisrv_service_file = true;
const minisrv_service_file = true;
if (request_headers.query.category) {
const wtvbgm = new WTVBGMusic(minisrv_config, session_data);
@@ -105,7 +105,7 @@ Choose the songs that you'd like to include.
<td valign="top">
<input type="checkbox" name="enableSong" value=${musicList[k]['id']}${(wtvbgm.isSongEnabled(musicList[k]['id'])) ? ' checked="checked"' : ''}>
</td><td valign="bottom">`;
const strLenLimit = 16;
let strLenLimit = 16;
if (musicList.length > 14) strLenLimit = 20;
let songTitle = musicList[k]['title'];
if (songTitle.length > strLenLimit) songTitle = musicList[k]['title'].substr(0, strLenLimit - 3) + "...";
@@ -150,7 +150,7 @@ Choose the songs that you'd like to include.
</display></display></body></html>`;
} else {
const errPage = doErrorPage("400", "Category ID is required.");
const errPage = wtvshared.doErrorPage("400", "Category ID is required.");
headers = errPage[0];
data = errPage[1];
}