I can't duplicate the exact scenario I described - but I may have found what happened. I think it might be a case issue.
In add_category gui2/dialogs/tag_categories.py you do a strcmp to see if the category already exists - but you don't ignore case like you do elsewhere (when reading in the db/appending a #, etc.) although the error message you generate says case may be the reason it exists. So the category is added to your internal list, but later on Calibre generates an unhandled exception ValueError: Attempt to add duplicate search term "@catc". So the item doesn't show in the tag browser, but is still available from the db.
I tested with a long name so perhaps I mistyped it and didn't notice the warning, etc. Right now I can add/delete and my plugin sees the changes fine except for the case issue above.
|