View Single Post
Old 06-03-2015, 08:30 PM   #479
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,117
Karma: 92190133
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by sweth View Post
it would be amazing if the plugin could support groupings of providers that could be acted on independently, including having info stored in different DB fields.

As one use case: I track audiobook and regular ebook versions of books in separate records in Calibre, and am now using the availability search to show the shortest number of weeks' wait among the libraries I have access to; right now, I either have to only track library availability of one or the other, track both in one record but then manually figure out which version's wait time is showing, or configure a provider for ebooks and another for audiobooks and then manually switch them on/off before updating one or the other set of records. If I could do the different-provider solution but just run one set or the other as needed, that would be much easier.

As another: I also prefer Overdrive versions of ebooks to ones from Open Library or Project Gutenberg; if I could easily search in OD libraries first and then fall back to OL/PG, that would be great.
What you are asking for would add flexibility, but it would also be quite a bit of work for me to implement something that I believe very few people would have a use for. The plugin is already more complicated to configure and use than I would like.

Searching for different books at individualized subsets of libraries or types (e-book/audiobook) seems like more trouble than it is worth to me. Just let the plugin gather as much data as possible and then filter out what you don't need. You can hide the ol_wait_weeks column and use it as the data source for new custom columns that contain the individual data elements filtered and sorted as you desire. A lot can be done using calibre template functions accessed from a custom column.

For example if you want a custom version of ol_wait_weeks that includes only links to audiobooks:

Code:
#function: ol_wait_audio_only
#arg count: 1
#doc: return only ol_wait_weeks links for audiobooks
#     Use in a custom column template: {#ol_wait_weeks:ol_wait_audio_only()}
#program code:

def evaluate(self, formatter, kwargs, mi, locals, ol_wait_weeks):
    all_entries = [w.strip() for w in ol_wait_weeks.split(',')]
    audio_entries = filter(lambda f: '#' in f, all_entries)
    return ', '.join(audio_entries)
jhowell is online now   Reply With Quote