advplyr / audiobookshelf

Self-hosted audiobook and podcast server
https://audiobookshelf.org
GNU General Public License v3.0
6.24k stars 437 forks source link

[Enhancement]: Add Filter [All / Audiobooks / E-Books] #3255

Open pekempy opened 1 month ago

pekempy commented 1 month ago

Type of Enhancement

Web Interface/Frontend

Describe the Feature/Enhancement

Audiobooks would show:

Ebooks would show:

All would be the default / cleared filter, and would show all library items.

Why would this be helpful?

Currently there's no way to filter the library to only show any item which contains an audiobook that I've found (Regardless of multi/single track, I can filter to single track OR multi-track, but not both at once) - Glad to be corrected if I am wrong

Future Implementation (Screenshot)

image (or just as a submenu in the existing filter as 'Media Type' -> 'All' / 'Audiobooks' / 'E-Books'

Audiobookshelf Server Version

2.12.1

Current Implementation (Screenshot)

image

nichwall commented 1 month ago

Related to https://github.com/advplyr/audiobookshelf/issues/1465

You can already filter by presence of ebooks

Screenshot_20240807-134451.png

Screenshot_20240807-134617.png

pekempy commented 1 month ago

Then maybe just an option for Has tracks in the tracks submenu (displaying both single and multi-tracks in a single filter), which would show any audiobooks and exclude ebook only?

advplyr commented 1 month ago

"Has no ebook" would mean that it has tracks otherwise it wouldn't be able to get scanned in.

To select all books that are ebook only you would select "Tracks->No tracks" To select all books that are audiobook only you would select "Ebooks->Has no ebook"

pekempy commented 1 month ago

I think I might be being misunderstood, so renamed the issue & updated OP Audiobooks would show:

Ebooks would show:

All would be the default / cleared filter, and would show all library items.

Currently there's no way to filter the library to only show any item which contains an audiobook that I've found (Regardless of multi/single track, I can filter to single track OR multi-track, but not both at once) - Glad to be corrected if I am wrong

advplyr commented 1 month ago

I see. I think adding "Has Tracks" to the "Tracks" menu would be the best solution

sydlexius commented 1 month ago

This seems unintuitive, since these are two different categories to perform similar functions. My preference would be to have a media types category, and nest most if not all of the options in Tracks and Ebooks under that instead.

advplyr commented 1 month ago

Media types makes sense. If we add that we should remove both Tracks and Ebooks. What would the options for Media types be so that it covers all use-cases?

pekempy commented 1 month ago

Media Types > Audiobooks > Has Tracks Media Types > Audiobooks > Single track Media Types > Audiobooks > Multi track Media Types > Audiobooks > No Tracks Media Types > Ebooks > Has Ebooks Media Types > Ebooks > Has Supplementary Ebooks Media Types > Ebooks > No Ebooks

Then obviously it would be clearable to show everything.

advplyr commented 1 month ago

Probably want to avoid double nesting like that if we can. The component would have to be written to support that and it is probably not necessary

sydlexius commented 1 month ago

This is where I wish ABS supported multiple library filters (such as req #1465), because we're dealing with at least 4 bits of information (single track, multi track, ebook, supplementary ebooks), that leaves a configuration matrix of 16 possible combinations. To enumerate each possible combination isn't going to be pretty.

With that said, at the bare minimum one may want to know if a title contains an audiobook, ebook, or both (ignoring single vs. multitrack, regular vs. supplementary ebooks).

advplyr commented 1 month ago

Yeah I'd like to do multi-filter but it will probably be a while before that happens if it does. Since we are still half-way through migrating to the new data model the sql queries as they are now are barely manageable.

We won't cover every possible permutation but we can cover the ones existing and the new one discussed in this thread.