Open
Description
What happened?
I noticed the HASS integration for AudioBookshelf was reporting errors, and after tracking it down I discovered it was because the totalSize parameter of api/libraries/library-id/stats for an empty library was null. Additionally totalDuration and numAudioTracks was also null. Given other numeric values in the stats are set to 0, I would assume these three should be as well.
What did you expect to happen?
totalSize, totalDuration and numAudioTracks should be 0 for empty libraries.
Steps to reproduce the issue
- Create an empty library
- Invoke api/libraries/library-id/stats
- View the result
Audiobookshelf version
v2.21.0
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?
None
Logs
Additional Notes
No response