I could use some advice.
I'm working on a plugin to merge epubs from existing books into a new epub in a new book. At the end, I'd like the plugin to automatically pop the 'Edit Metadata' dialog for the newly created book.
Near as I can tell, I have to get the new book selected in the main book list, then invoke edit_metadata on the metadata action. But I've had no luck figuring out how to select a row from the book_id.
Code:
book_id = db.create_book_entry(mi,add_duplicates=True)
# ...
self.gui.library_view.model().books_added(1)
self.gui.library_view.selectionModel().clearSelection()
self.gui.library_view.selectionModel().select(???)
self.gui.iactions['Edit Metadata'].edit_metadata(False)
Any suggestions?
Thanks,
Jim