Adding download tab and download manager, ffmpeg in worker thread

This commit is contained in:
Mark Cooper 2021-09-04 14:17:26 -05:00
parent a86bda59f6
commit e4dac5dd05
28 changed files with 757 additions and 60 deletions

View file

@ -17,6 +17,13 @@ async function getFileStat(path) {
}
module.exports.getFileStat = getFileStat
async function getFileSize(path) {
var stat = await getFileStat(path)
if (!stat) return 0
return stat.size || 0
}
module.exports.getFileSize = getFileSize
function bytesPretty(bytes, decimals = 0) {
if (bytes === 0) {
return '0 Bytes'