mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-27 09:08:57 +01:00
commit
7fdf1a1d7f
@ -83,7 +83,7 @@ function bytesPretty(bytes, decimals = 0) {
|
||||
if (bytes === 0) {
|
||||
return '0 Bytes'
|
||||
}
|
||||
const k = 1024
|
||||
const k = 1000
|
||||
var dm = decimals < 0 ? 0 : decimals
|
||||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(k))
|
||||
@ -265,4 +265,4 @@ module.exports.removeFile = (path) => {
|
||||
|
||||
module.exports.encodeUriPath = (path) => {
|
||||
return filePathToPOSIX(path).replace(/%/g, '%25').replace(/#/g, '%23')
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user