stump icon indicating copy to clipboard operation
stump copied to clipboard

[BUG] Books Not Sorting Correctly in Stump

Open Ammoton opened this issue 1 year ago • 5 comments

Description of the Bug

Books that are named Volume 1, Volume 2, Volume 3, ... are sorted incorrectly.

They appear in this order:

1 10 11 ... 19 2 20

Expected Behavior

They should be sorted like this:

1 2 3 ... 9 10 11

Environment:

  • OS: [Windows]

Build Details:

  • Version: [0.0.7]
  • Docker: [no]

Ammoton avatar Oct 16 '24 22:10 Ammoton

Books that are named Volume 1, Volume 2, Volume 3, ... are sorted incorrectly.

When you say named, are you referring to the filename (e.g. Volume 1.zip) or the name pulled from metadata?

aaronleopold avatar Oct 16 '24 22:10 aaronleopold

I'm referring to the filename. But the title in the metadata is also set. I tested a little more, and if I only use the filename without metadata, it's not sorted correctly. If I use metadata (title) and filenames like 01, 02, etc., it works. But if I use 1, 2, etc., it doesn't. Could it be that the filename is prioritized?

Ammoton avatar Oct 17 '24 15:10 Ammoton

Yeah IIRC the filename is most likely what is being prioritized at the moment. Coincidentally I started a refactor for the sorting implementation a week or so ago here. I think I'll try to explore fixing this issue there, once what I have is viable, as it makes ordering by relations (i.e. the metadata) more possible.

I'll report back once I have something. Thanks for letting me know!

aaronleopold avatar Oct 17 '24 16:10 aaronleopold

I wanted to post a little update just to say I haven't forgotten about this. I have a viable fix seemingly working, but there is a lot of UI work associated with the overhaul to how ordering and filtering works. My progress is contained to this branch for any code-savvy followers: https://github.com/stumpapp/stump/tree/experiment/pin-prisma. I'll aim to get it into experimental by the end of December, ideally

aaronleopold avatar Nov 26 '24 22:11 aaronleopold

I'll aim to get it into experimental by the end of December, ideally

That didn't happen 😓

I promise this hasn't slipped my radar though. I'll be rounding out granular scans first, other smaller-scoped bug fixes, and then plan to revisit that in progress branch with potential fixes. The big headache is potentially having to make upstream changes to the prisma client, but I intend to eventually get around to fixing this.

aaronleopold avatar Jan 16 '25 16:01 aaronleopold