New glitch noticed after updating to newest version:
On my 'view' chain,
view_manager_last_view() != 'Physical Books' in conditions results in an action consistently failing. Removing it made it work again. I got this error in the evaluator:
Code:
EXCEPTION: Interpreter: Internal error evaluating an expression: 'eval_() missing 1 required positional argument: 'locals'' - line number 2
Here's the function:
Code:
from calibre_plugins.action_chains.templates import TemplateFunction
class ViewManagerLastVIew(TemplateFunction):
name = 'view_manager_last_view'
arg_count = 0
def evaluate(self, formatter, kwargs, mi, locals):
import calibre_plugins.view_manager.config as cfg
gui = self.plugin_action.gui
library_config = cfg.get_library_config(gui.current_db)
return library_config.get(cfg.KEY_LAST_VIEW, '')
Thankfully, current_virtual_library_name() works just as well (maybe better) for my purposes - but was something used in it deprecated or changed?