rmcrackan / Libation

Libation: Liberate your Library
GNU General Public License v3.0
2.65k stars 144 forks source link

Enhanced series handling in UI #1008

Open cbordeman opened 2 days ago

cbordeman commented 2 days ago

This one I'm not sure about. Please correct me if I'm wrong about what you can actually do!

I like that I can just type "bobiverse" or "Hitchhiker" and see everything from that series. But you can't see a list of your series, and that's how I like to find books.

The filter is also less than ideal because the book number is contained in the book name, and so not sortable, and you can get books from other series. Often the book # is not in the Series # at all.

So my request is twofold:

1) Do some parsing on the book title and the series # to extract the series # (as a number not contain the # symbol). If the Series# is not present (some older books), try to parse the book number from the book name. The old fields would still exist, to preserve any data processing. 2) Add a narrow list on the left side of the main view containing "All Books" and then each of the available series, which would filter the main list.

cbordeman commented 2 days ago

I could work on this, too.

rmcrackan commented 1 day ago

I like this. I've thought about things like this also. Consider piggy-backing on the search filters for behind the scenes implementation since it already does a ton of parsing for you. For instance, you could create a UI which submits the search series:hitchhiker . Or to be even more specific: SeriesId:B00713SI1W

Search engine rules/parsing starts here and is easy to extend:

https://github.com/rmcrackan/Libation/blob/4521c5d5ed14a94dd073c72b3aa615a41211d02d/Source/LibationSearchEngine/SearchEngine.cs#L36

You don't have to do it this way, but it could save you a lot of work.

cbordeman commented 1 day ago

@rmcrackan Well, I don't want it to interfere with the quick filter the user may be already applying, just work on top of them. So I think I should just take the list of books already retrieved and extract the available series for display. Then apply a secondary filter manually on the ListCollectionView.Filter if they've selected a book series.

rmcrackan commented 1 day ago

Fair enough. I think we're still on the same page: the mechanism is the same. That is, using the current filter architecture on top of lucene instead of building a new engine. It sounds like we'll need layer on top of it to twiddle how the current filter is managed.

cbordeman commented 1 day ago

@rmcrackan I certainly don't want to build anything new. This would just be for the main view, so it would be implemented there only. I wouldn't think you'd want this filter to affect other functions of the program. IOW, don't think of this as a filter, just a view thing.

rmcrackan commented 1 day ago

Makes sense. I also thought of creating a view like this for tags. If it's an easy extension of your project, lemme know.