mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-22 00:49:10 +02:00
Fix:Byte conversion to use 1000 instead of 1024 to be accurate with abbrevs #3386
This commit is contained in:
parent
423a2129d1
commit
4ddd2788f0
2 changed files with 1 additions and 14 deletions
|
@ -11,7 +11,7 @@ Vue.prototype.$bytesPretty = (bytes, decimals = 2) => {
|
|||
if (isNaN(bytes) || bytes == 0) {
|
||||
return '0 Bytes'
|
||||
}
|
||||
const k = 1024
|
||||
const k = 1000
|
||||
const 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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue