Open mattheys opened 2 weeks ago
@advplyr, do you consider this a bug or a feature?
I think it's a feature, not a bug. Collapse Series just represents all books of a series as one book entry, and should not affect the sorting of the library. The library view is still about books, not about series, and sorting as requested would not be an apple-to-apple comparison.
On the other hand, @mattheys may have a point.
Using the total duration of the collapsed series is a feature request. However, what can be considered a bug is that currently it sorts the collapsed series using the first book, but doesn't show the duration.
Before switching to sqlite collapsed series were always put at the bottom for every sort except title. The series name is used for title sort. Now it is using the first book, but not showing the sort value which could be considered a bug.
There has been a lot of discussion about how to handle collapse series. Before switching to sqlite it was much easier to work with but now that we have to write queries that can be paginated with filter/sort it has become very difficult with the current data models. I believe there is an open feature request for merging the authors for collapsed series and there are a few other threads about sorting collapsed series.
The library view is still about books, not about series, and sorting as requested would not be an apple-to-apple comparison.
This has been my primary argument against treating collapsed series as essentially a merged book. I think there is also a good argument to do it.
If we choose to do this we have to think of a new way to query for the data. I remember coming up with a possible solution in Discord, I'll have to try to find that old conversation.
I couldn't find the old discussion but I don't think it is worth pursuing this until we are fully off of the old library item model. It will be easier to optimize the queries when we don't have to make every query pulling the data needed for the old library item model.
What happened?
When you collapse the series in Library view and then sort by duration, the duration of the first item in the series seems to be chosen for the sorting. This should probably be a summation of the series duration as it makes the series look like it's the incorrect length.
What did you expect to happen?
The series with that longest combined runtime to be the top of the list.
Steps to reproduce the issue
Audiobookshelf version
2.13.4
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?
Chrome
Logs
No response
Additional Notes
Same can be said for the Size sorting as well.