Originally Posted by BakerBug
I seem to have broken this plugin.
Here are the steps that caused the problem.
1. Load a PDF into Calibre.
2. Convert the PDF to Mobi.
3. Add the Mobi to the Book Sync List.
4. Remove the PDF from Calibre. (Ops.. this removes the Mobi book too).
5. Look at the Book Sync list.
Then you get:
TypeError: 'NoneType' object is not subscriptable
I've tried uninstalling the plugin and reinstalling. It's still broke. Is there any way to delete the sync list (there were two other books on the list before I hosed things up)? I suspect that the list is corrupt since it contains an entry to a book that I removed from Calibre. When I re-added the book, Book Sync was still broke.
Ok, there are two things going on here.
There is clearly a "bug" in Book Sync when displaying the contents of the list. I'll post a new version in a few minutes so that any time you try to view the list it checks each id is still valid and removes any that are not, as is the case when you have deleted the record.
I had assumed integrity of that list when deletes occur but clearly there is not. I suspect that if you were to connect your device now, any faulty ids would be flushed out and you should no longer have a problem. This exact same "flaw" would occur for creating and then deleting news, but because there is no way to display the list of pending news items without this plugin you are not able to see invalid items in your list.