streaming output data with drain detection support

- other stuff x.x
This commit is contained in:
zefie
2021-08-11 19:48:27 -04:00
parent fecbd032da
commit 0f0cc623c0
4 changed files with 100 additions and 35 deletions

View File

@@ -94,6 +94,16 @@ class WTVShared {
return path;
}
/**
* Returns a percentage
* @param {number} partialValue
* @param {number} totalValue
* @returns {number} percentage
*/
getPercentage = function (partialValue, totalValue) {
return Math.floor((100 * partialValue) / totalValue);
}
/**
* If the file ends with .gz, remove it
* @param {string} path