View Single Post
Old 12-30-2018, 09:25 AM   #11
jmoore914
Junior Member
jmoore914 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2018
Device: Kindle
Quote:
Originally Posted by kovidgoyal View Post
If you are doing this in a GUI plugin then dont use the db API directly, instead use the existing remove books action which will take care of refreshing the GUI for you automatically. Something like:


Code:
self.gui.iactions['Remove Books'].remove_format_by_id(book_id, fmt)
Note however, that this function will ask the user for confirmation. If you want to avoid that, then look at its code and re-implement it yourself, you will find it in actions/delete.py
Hi Kovid,

I was not planning on making this a GUI plugin so I will look into re-implementing the function myself. Thanks for the suggestion and for making such an amazing program!
jmoore914 is offline   Reply With Quote