kagemomiji / airsonic-advanced

airsonic-advanced
GNU General Public License v3.0
161 stars 14 forks source link

[Bug]: Library size overflow; negative bytesize #187

Closed DutchComputerKid closed 1 year ago

DutchComputerKid commented 1 year ago

What happened?

The library size Airsonic reports is in Bytes only. Looks like this overflows and goes negative when the library gets too big?

6,422 artists
12,826 albums
88,508 songs
-9223366859994143723 B
8,654 hours

This bug has been here for as long as this fork is installed, no idea if airsonic-advanced does this as well. This information is on the bottom of the left library/index popout.

Steps to reproduce

Have a library big enough? Subsonic reports 4839.26 GB in use but reports 7,522 albums instead of Airsonic's 12 thousand.

Version

11.1.x (Edge)

Version Detail

11.1.2-SNAPSHOT.20230407154617 (and older)

Operating System

Debian 11

Java Version

openjdk 17.0.6 2023-01-17 (build 17.0.6+10-Debian-1deb11u1)

Database

Other

DB Detail

Built-In

Configuration parameter

Nothing

Proxy Server

Nginx

client detail

All web browsers

language

English

Relevant log output

None

kagemomiji commented 1 year ago

@DutchComputerKid

Type of total bytes parameter is long , which can count to 9223372036854775807 Bytes (8,388,608TB).

I guess you have cue sheets and some of them would not work. (ref #188) So this issue comes from a wrong calculation of the total bytes with cue sheets.

Could you try this airsonic.war? If you use docker, ghcr.io/kagemomiji/airsonic-advanced:pr-189 is also available for test.

After you upgrade your airsonic-advanced, please execute library scan and check total bytes.

DutchComputerKid commented 1 year ago

Wow this went way deeper than I expected. If its at its limit all the time then yeh that could totally make sense. Anyhow, the new war file linked is not found; 404 on browser and wget.

kagemomiji commented 1 year ago

@DutchComputerKid How about here? airsonic.war

DutchComputerKid commented 1 year ago

Excellent, this one works! It now says 4.73 TB properly.