From 0c0d1821d6b304787baec6f2ae44334952a22bae Mon Sep 17 00:00:00 2001 From: zefie Date: Tue, 10 Aug 2021 22:48:28 -0400 Subject: [PATCH] fix PUT commands --- zefie_wtvp_minisrv/WTVDownloadList.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/zefie_wtvp_minisrv/WTVDownloadList.js b/zefie_wtvp_minisrv/WTVDownloadList.js index 5e3c60f1..3dd3b1e2 100644 --- a/zefie_wtvp_minisrv/WTVDownloadList.js +++ b/zefie_wtvp_minisrv/WTVDownloadList.js @@ -115,7 +115,7 @@ class WTVDownloadList { */ put(path, destination) { this.download_list += "PUT " + path + "\n"; - this.download_list += "location: " + destination + "\n"; + this.download_list += "location: " + destination + "\n\n"; } /** @@ -124,8 +124,7 @@ class WTVDownloadList { * @param {string} destination Destination file path in the User Store */ putUserStoreDest(path, destination) { - this.download_list += "PUT " + path + "\n"; - this.download_list += "location: " + this.service_name + ":/userstore?partialPath="+escape(destination) + "\n"; + this.put(path, this.service_name + ":/userstore?partialPath=" + escape(destination)); } /** @@ -134,8 +133,7 @@ class WTVDownloadList { */ putUserStore(path) { var destination = path.replace("file://", ""); - this.download_list += "PUT " + path + "\n"; - this.download_list += "location: " + this.service_name + ":/userstore?partialPath=" + escape(destination) + "\n\n"; + this.putUserStoreDest(path, destination); } /** * Adds a GET command to the download list