fix LC2 flashrom
This commit is contained in:
@@ -40,15 +40,7 @@ async function processLC2DownloadPage(flashrom_info, headers, numparts = null) {
|
||||
if (!flashrom_info.message && flashrom_info.is_bootrom) {
|
||||
flashrom_info.message = "BootRom Part " + (flashrom_info.part_number + 1) + " of " + flashrom_info.part_count;
|
||||
}
|
||||
|
||||
if (!flashrom_info.is_last_part) {
|
||||
flashrom_info.next_rompath = request_headers.request_url.replace(
|
||||
encodeURIComponent(request_headers.query.path),
|
||||
encodeURIComponent(flashrom_info.next_rompath.replace(service_name + ":/", ""))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
const romtype = ssid_sessions[socket.ssid].get("wtv-client-rom-type");
|
||||
let defaultDownloadTime;
|
||||
switch (romtype) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const minisrv_service_file = true;
|
||||
|
||||
if (request_headers.query.path) {
|
||||
let url = service_name + ":/get-lc2-page?path=" + request_headers.query.path;
|
||||
let url = service_name + ":/get-lc2-page?path=" + encodeURIComponent(request_headers.query.path);
|
||||
const romtype = session_data.get("wtv-client-rom-type");
|
||||
if (romtype == "bf0app") {
|
||||
url = "client:updateflash?ipaddr=" + minisrv_config.services[service_name].host + "&port=" + minisrv_config.services[service_name].port + "&path=" + encodeURIComponent(service_name + ":/" + request_headers.query.path);
|
||||
|
||||
@@ -93,7 +93,7 @@ class WTVFlashrom {
|
||||
if (flashrom_info.is_last_part) {
|
||||
if (this.minisrv_config.config.debug_flags.debug && !this.minisrv_config.config.debug_flags.quiet && !this.no_debug) console.log(" # Flashrom Curr Part is Last:", flashrom_info.is_last_part);
|
||||
} else {
|
||||
flashrom_info.next_part_number = flashrom_info.part_number + 1;
|
||||
flashrom_info.next_part_number = parseInt(flashrom_info.part_number) + 1;
|
||||
if (this.minisrv_config.config.debug_flags.debug && !this.minisrv_config.config.debug_flags.quiet && !this.no_debug) console.log(" # Flashrom Next Part Number :", flashrom_info.next_part_number);
|
||||
}
|
||||
|
||||
@@ -107,8 +107,7 @@ class WTVFlashrom {
|
||||
} else if (flashrom_info.is_last_part && !this.bf0app_update) {
|
||||
flashrom_info.next_rompath = "wtv-flashrom:/lc2-download-complete?";
|
||||
} else {
|
||||
flashrom_info.next_part_number = this.formatPartNum(flashrom_info.part_number + 1);
|
||||
flashrom_info.next_rompath = flashrom_info.rompath.replace("part" + this.formatPartNum(flashrom_info.part_number), "part" + flashrom_info.next_part_number);
|
||||
flashrom_info.next_rompath = flashrom_info.rompath.replace("part" + this.formatPartNum(flashrom_info.part_number), "part" + this.formatPartNum(flashrom_info.next_part_number));
|
||||
}
|
||||
return flashrom_info;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user