finish documentation in WTVDownloadList class

This commit is contained in:
zefie
2021-08-10 13:37:17 -04:00
parent 83f44d7867
commit 3a9674bda9

View File

@@ -1,5 +1,8 @@
/**
* wtv/download-list creation helper class
* By: zefie
*/
class WTVDownloadList { class WTVDownloadList {
download_list = ""; download_list = "";
content_type = "wtv/download-list"; content_type = "wtv/download-list";
@@ -138,9 +141,9 @@ class WTVDownloadList {
/** /**
* Adds a SET-GROUP command to the download list * Adds a SET-GROUP command to the download list
* @param {any} group Group to set state of * @param {string} group Group to set state of
* @param {any} state State to set group to * @param {string} state State to set group to
* @param {any} version Version to set group to * @param {string} version Version to set group to
*/ */
setGroup(group, state, version) { setGroup(group, state, version) {
this.download_list += "SET-GROUP " + group + "\n"; this.download_list += "SET-GROUP " + group + "\n";
@@ -148,9 +151,10 @@ class WTVDownloadList {
this.download_list += "version: " + version + "\n"; this.download_list += "version: " + version + "\n";
this.download_list += "last-checkup-time: " + new Date().toUTCString().replace("GMT", "+0000") + "\n\n"; this.download_list += "last-checkup-time: " + new Date().toUTCString().replace("GMT", "+0000") + "\n\n";
} }
/** /**
* Adds a DELETE-GROUP command to the download list * Adds a DELETE-GROUP command to the download list
* @param {any} group Group to delete * @param {string} group Group to delete
*/ */
deleteGroup(group) { deleteGroup(group) {
this.download_list += "DELETE-GROUP " + group + "\n\n"; this.download_list += "DELETE-GROUP " + group + "\n\n";
@@ -158,8 +162,8 @@ class WTVDownloadList {
/** /**
* An alias for deleteGroup() that handles deleting the '-UPDATE' group files for you * An alias for deleteGroup() that handles deleting the '-UPDATE' group files for you
* @param {any} group * @param {string} group Group to delete
* @param {any} path * @param {string} path Group base path
*/ */
deleteGroupUpdate(group, path) { deleteGroupUpdate(group, path) {
this.deleteGroup(group + "-UPDATE"); this.deleteGroup(group + "-UPDATE");