Quote:
Originally Posted by kovidgoyal
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!