View Single Post
Old 10-14-2022, 10:53 AM   #1
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,730
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Is there a way to get author/tag/series/publisher ids+text within a virtual library?

In my Find Duplicates plugin, the main "Find Book Duplicates" functionality respects whatever virtual library search restriction you have applied.

EDIT: On further reading I can see that it uses self.gui.library_view.model() to operate within, and then only where it needs a more specific subset that it uses db.data.search_getting_ids() passing the restriction through.

However the Metadata Variations duplicate check does *not* currently respect the virtual library selection. Looking at the code I wrote forever ago, it seems that for those searches I am invoking one of the following depending on user selection:
  • db.get_authors_with_ids()
  • db.get_series_with_ids()
  • db.get_publishers_with_ids()
  • db.get_tags_with_ids()

Is there an API equivalent I could use for these that could take a search_restriction argument? Or should I just iterate over the model to build up my own dictionaries?

Last edited by kiwidude; 10-14-2022 at 11:02 AM. Reason: Found more info...
kiwidude is offline   Reply With Quote