[Bug]: Library size stat loses precision when total size reaches terabytes #2240

Closed
opened 2026-04-25 00:05:20 +02:00 by adam · 2 comments
Owner

Originally created by @gvarph on GitHub (Sep 7, 2024).

What happened?

My library size recently reached 1TB, and since the library stats screen strips decimals, showing only that my library is 1TB (see attached image), but it does not specify it it is 1025GB or 1900GB

To be specific, the current size of my library is 1129115996KB ~= 1.13TB based on du -sh ., so I am not quite sure if it rounds up above 1.5TB

{57E140EA-085D-4C65-8186-B6CCF7D703EB}

What did you expect to happen?

I would like to see at least one or two decimals when the amount reaches above 1TB so I have a general idea of how much data my books are taking up without having to manually check the size of the directory they are stored in.

Steps to reproduce the issue

  1. Create a library with >1TB data
  2. Go to the settings>stats page
  3. Check the top bar to see the total size of the library

Audiobookshelf version

v2.13.3

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Other (list in "Additional Notes" box)

Logs


Additional Notes

Tested on both chrome (android), Firefox (windows), firefox (mac)

Originally created by @gvarph on GitHub (Sep 7, 2024). ### What happened? My library size recently reached 1TB, and since the library stats screen strips decimals, showing only that my library is 1TB (see attached image), but it does not specify it it is 1025GB or 1900GB To be specific, the current size of my library is 1129115996KB ~= 1.13TB based on `du -sh .`, so I am not quite sure if it rounds up above 1.5TB ![{57E140EA-085D-4C65-8186-B6CCF7D703EB}](https://github.com/user-attachments/assets/a665faec-ed30-41ea-9467-8c205911be8b) ### What did you expect to happen? I would like to see at least one or two decimals when the amount reaches above 1TB so I have a general idea of how much data my books are taking up without having to manually check the size of the directory they are stored in. ### Steps to reproduce the issue 1. Create a library with >1TB data 2. Go to the settings>stats page 3. Check the top bar to see the total size of the library ### Audiobookshelf version v2.13.3 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? Other (list in "Additional Notes" box) ### Logs ```shell ``` ### Additional Notes Tested on both chrome (android), Firefox (windows), firefox (mac)
adam added the bug label 2026-04-25 00:05:20 +02:00
adam closed this issue 2026-04-25 00:05:20 +02:00
Author
Owner

@advplyr commented on GitHub (Sep 7, 2024):

This was because it was actually converting to TiB instead of TB.

1129115996 KB is ~1.02 TiB.

This change will now show 1.1TB for your library.

@advplyr commented on GitHub (Sep 7, 2024): This was because it was actually converting to TiB instead of TB. 1129115996 KB is ~1.02 TiB. This change will now show 1.1TB for your library.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 9, 2024):

Fixed in v2.13.4.

@github-actions[bot] commented on GitHub (Sep 9, 2024): Fixed in [v2.13.4](https://github.com/advplyr/audiobookshelf/releases/tag/v2.13.4).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2240