fix file loading issues, v0.6.1

This commit is contained in:
zefie
2021-07-15 02:09:37 -04:00
parent a0c8299a31
commit d64e9a0e94
8 changed files with 51 additions and 28 deletions

View File

@@ -6,8 +6,7 @@ if (socket_session_data[socket.id].ssid != null && !sec_session[socket_session_d
var contype = "text/tellyscript";
// skip telly for now
var notelly = true;
var skip_tellyscript = false;
// if relogin, skip tellyscript
if (query['relogin']) {
@@ -31,16 +30,17 @@ wtv-client-time-dst-rule: GMT
wtv-client-date: `+strftime("%a, %d %b %Y %H:%M:%S", new Date(new Date().toUTCString()))+` GMT`;
// if relogin, skip tellyscript
if (query['relogin'] == false || notelly == false) {
var romtype = null;
if (!query['relogin'] && skip_tellyscript == false) {
var romtype = getSessionData(socket_session_data[socket.id].ssid, 'wtv-client-rom-type');
}
switch (romtype) {
case "US-LC2-disk-0MB-8MB":
data = getFile("LC2/LC2_OISP_5555732_56k.tok", true);
break;
switch (romtype) {
case "US-LC2-disk-0MB-8MB":
data = getFile("LC2/LC2_OISP_5555732_56k.tok", true);
break;
default:
data = '';
break;
}
default:
data = '';
break;
}