navidrome / navidrome

🎧☁️ Modern Music Server and Streamer compatible with Subsonic/Airsonic
https://www.navidrome.org
GNU General Public License v3.0
10.16k stars 783 forks source link

[Bug]: WebUI doesn't sort by new option AlbumPlayCountMode normalized #2984

Closed metalheim closed 2 weeks ago

metalheim commented 2 weeks ago

I confirm that:

Version

0.52.0

Current Behavior

In the WebUI, the "Most played" Albums tab doesnt sort correctly if the new configuration option AlbumPlayCountMode is set to "normalized". Configuration seems to correctly "normalize" the playcount values (otherwise, the albums in below screenshots would have hundreds of plays), but sorting this column is off.

image

As you can see, it shows an album with 10 plays as first, but then two albums with 3 play and then albums with >1 play.

Expected Behavior

Sorting by Playcount in WebUI should work the same way as it does with AlbumPlayCountMode set to "absolute" (just with different playcounts of course)

Steps To Reproduce

  1. Have albums with lots of plays and lots of tracks
  2. Set AlbumPlayCountMode to "normalized"
  3. go to WebUI tab "Most Played"
  4. Sorting is wrong

Environment

- OS: Synology DSM7.2 - Navidrome install through Docker
- Browser: Latest Chrome and Latest MS Edge
- Client: WebUI

How Navidrome is installed?

Docker

Configuration

[..]                                                                                                                                                                                                               AlbumPlayCountMode="normalized"
[..]

Relevant log output

No response

Anything else?

No response

Code of Conduct

metalheim commented 2 weeks ago

Could a full scan help here? I'm hesitant to just launch a full scan, as it takes quite long with my library size+processor power combination.

deluan commented 2 weeks ago

Ops, my bad! The implementation is incomplete as it does not use the calculated album play count to sort or filter in smart playlists. I'll work on this and release a patch version soon.

rombat commented 2 weeks ago

Ops, my bad! The implementation is incomplete as it does not use the calculated album play count to sort or filter in smart playlists. I'll work on this and release a patch version soon.

Thanks ! I had the exact same problem and was wondering why. And by the way, thanks a lot for this feature 👍🏼

deluan commented 2 weeks ago

Should be fixed in the latest develop, please let me know. Thanks!