Quote:
Originally Posted by chaley
I am going to jump in here after reading something on the generate cover thread. I have no idea what this plugin does, but as I wrote the custom column and template code in calibre, perhaps I can help.
|
Great, thanks!
Quote:
Originally Posted by chaley
...
If the plugin is doing the above or something like it, then between steps 2 and 3 (I think) it should do "db.refresh_ids([list of book ids])", where "db" is the database object that you should already have. The list of IDs should contain all the ids that you will pass to get_metadata.
|
Basically, that is what's happening. And I arrived at the same solution after some experimentation:
Code:
self.gui.library_view.model().refresh_ids([book_id])
If that's the official solution, I can certainly live with it.
But it would have been a lot easier to find if the behavior were consistent, either one way or the other.
A simple custom column and a composite column with a simple template ("{#characters}, {#genre}"): both work without the refresh.
But a composite column with a template function ("{#genre:uppercase()}") doesn't work without the refresh.