janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
13k stars 1.39k forks source link

Advanced sorting options #1606

Open haertig opened 4 years ago

haertig commented 4 years ago

When browsing with Calibre-Web, it would be nice to have the ability to do multi-level sorting based on user-chosen fields.

e.g., "Sort by Author, then by Series, then by book # in series, then by book Title"

Also, the ability to flag this custom sort as your Home Page when first logging into Calibre-Web. Recently Added is a nice built-in sort, but it would be my preference to have this as a secondary choice after sort->Author,Series,Book#,BookTitle.

For books not in a series, the above example sort should gracefully downgrade to simply sort->Author,BookTitle since the Series and Book# fields would be blank.

Fractional Book#'s would need to be accounted for as well in the sort. Many series stick a short story in between major books, and in Calibre this would display like this example (based on the way I personally enter the metadata): I, II, III, IV, 4.10, 4.20, V, VI, 6.10, VII

haertig commented 4 years ago

An additional preference: When an Author has both standalone books (Series and Book# fields blank) and Series books, sort the standalone books separately, and place them either before or after all the separately sorted Series books. Do not do an intermixed sort of BookTitle and Series that would result in an (example) display of: Series1,BookTitle1, Series2,Series3,BookTitle2. That looks messy to me. I would prefer: BookTitle1,BookTitle2,Series1,Series2,Series3. You could concoct some user option to give a choice between these two hybrid/intermixed sort outputs.

haertig commented 4 years ago

And one more related request: Have the ability to apply this user defined custom sort to all displays. e.g., when you choose, say, a Category, after you have identified all the individual books that match that Category, then apply the custom sort to the identified data set. Or at least make this a user settable option. Ditto for a data set found by entering "Search" criteria. Identify all matching books, then apply the users chosen sort criteria.

Implementation of this request, and sub-requests I have subsequently added, might be done by adding an additional sort button at the top of the display, alongside the other existing sort buttons. Label the new button "Custom" (hidden if no custom sort is defined), and give users a setting preference where they could specify which "sort Button" to apply as the default when a new output page is rendered.