mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-08 08:24:59 +02:00
Adding download tab and download manager, ffmpeg in worker thread
This commit is contained in:
parent
27956bd67a
commit
1aff255170
28 changed files with 757 additions and 60 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue