View Single Post
Old 08-17-2021, 06:29 AM   #9
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,200
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
I posted a new version. This version adds a new event called "Book Created" for newly added book(s). In the previous version, the following events were triggred when adding books:
  • metadata_changed: This event was triggred multiple times for newly added books (once for each field).
  • cover_modified.
  • format_added.

As a result, there were a lot of events per book, and consequently multiple updates to date fields by the plugin when a book was added. This lead to problem when adding multiple books (ThreadViolationError Exception).

So, the in the new plugin, all the above events are dropped for newly created books; so they will not update any date field. The only event that is not dropped is the "book_created" event.

This makes it cleaner IMO. Also it reduces the frequency of the ThreadViolationError exception, although I am not sure it goes away completely. So people using the plugin can start in debug mode and monitor whether this error is still happening.
capink is offline   Reply With Quote