View Single Post
Old 01-01-2012, 01:46 PM   #319
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,024
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by kiwidude View Post
Bearing in mind that these methods should still be called from a GUI thread and not a background thread, because adding/removing from a list can result in changes to the database if the user has rules setup to modify tags/custom columns based on list add/remove. Any database updates need to be done on the UI thread to be sure there is no conflict with the user currently editing data manually etc. So hence why plugins like metadata downloads force the operation back onto the GUI thread by prompting with a dialog after the background work is done. I suggest you follow the same pattern if the rest of your plugin is doing background work stuff.
@kiwidude-I thought I might be doing that wrong. Thanks for the advice. I've been looking at Count Pages and now Reading List to borrow ideas from. Is there a better background processing plugin you'd recommend for me to study?
Quote:
Originally Posted by kiwidude View Post
I have also exposed for your convenience:
get_book_list(list_name)
get_list_names(exclude_auto=True)
@kiwidude-Thanks. But you forgot the self parameter on get_book_list & get_list_names.
JimmXinu is offline   Reply With Quote