fix createPage in WTVAuthor
This commit is contained in:
@@ -97,7 +97,7 @@ data = `<html>
|
||||
<br><br>
|
||||
<font color=white>
|
||||
<progressindicator name="downloadprogress"
|
||||
message="Retrieving Files..."
|
||||
message="${message}"
|
||||
height=40 width=250>
|
||||
</font>
|
||||
</table>
|
||||
|
||||
@@ -3,6 +3,7 @@ const minisrv_service_file = true;
|
||||
if (request_headers['wtv-request-type'] === "download") {
|
||||
const wtvdl = new WTVDisk(minisrv_config, service_name);
|
||||
headers = "200 OK\nContent-Type: " + wtvdl.content_type;
|
||||
wtvdl.display("Obtaining group data...");
|
||||
wtvdl.execute('client:donothing');
|
||||
data = wtvdl.getDownloadList();
|
||||
const client_group_data = wtvdl.getGroupDataFromClientPost(request_headers.post_data.toString(CryptoJS.enc.Latin1));
|
||||
@@ -13,8 +14,9 @@ if (request_headers['wtv-request-type'] === "download") {
|
||||
const query = request_headers.query;
|
||||
query['url'] = 'wtv-disk:/get-group-data';
|
||||
query['success_url'] = 'wtv-disk:/delete-group';
|
||||
query['message'] = "Obtaining group data...";
|
||||
const queryString = Object.keys(query)
|
||||
.map(key => encodeURIComponent(key) + '=' + encodeURIComponent(query[key]))
|
||||
.join('&');
|
||||
headers = "302 Found\nLocation: wtv-disk:/content/DownloadScreen.tmpl" + (queryString ? ("?" + queryString) : "");
|
||||
headers = "302 Found\nwtv-expire-all:wtv-disk:\nLocation: wtv-disk:/content/DownloadScreen.tmpl" + (queryString ? ("?" + queryString) : "");
|
||||
}
|
||||
@@ -98,7 +98,7 @@ class WTVAuthor {
|
||||
}
|
||||
pagenums = pagenums.sort()
|
||||
this.debug("createPage", "pagenums", pagenums)
|
||||
const pagenum = parseInt(pagenums[pagelen - 1]);
|
||||
pagenum = parseInt(pagenums[pagelen - 1]);
|
||||
this.debug("createPage", "pagenum", pagenum)
|
||||
this.debug("createPage", "pagelen", pagelen)
|
||||
}
|
||||
@@ -139,12 +139,12 @@ class WTVAuthor {
|
||||
|
||||
loadPage(pagenum) {
|
||||
this.pagestoreExists()
|
||||
const page_file = this.listPages();
|
||||
const page_data_raw = page_file[pagenum];
|
||||
const page_file = this.listPages();
|
||||
const page_data_raw = page_file[pagenum];
|
||||
|
||||
if (page_data_raw) {
|
||||
return page_data_raw;
|
||||
}
|
||||
if (page_data_raw) {
|
||||
return page_data_raw;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user