View Single Post
Old 11-22-2020, 05:42 PM   #25
capink
Addict
capink knows more than wikipediacapink knows more than wikipediacapink knows more than wikipediacapink knows more than wikipediacapink knows more than wikipediacapink knows more than wikipediacapink knows more than wikipediacapink knows more than wikipediacapink knows more than wikipediacapink knows more than wikipediacapink knows more than wikipedia
 
Posts: 270
Karma: 47128
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
Example:

1. I have a column icon rule set to display an icon if the Languages field is empty.
2. If I use Action Chains to set the Language field, the icon doesn't immediately disappear. This is a common glitch when plugins change the metadata.
3. So I use "Re-apply current sort" (a default Calibre action, in the Keyboard Shortcuts) and the icons will refresh.
Ahh, I got it. The plugin should probably refresh the gui after running the chain. I will add this to next release, and see if it solves your problems.

Was not aware of the re-apply sort trick. If you want an action that does that, try this custom action. (Manage modules > create module > copy paste in the module editor, and give the module a name)

Code:
from calibre_plugins.action_chains.actions.base import ChainAction

class ResortAction(ChainAction):

    name = 'Re-sort'

    def run(self, gui, settings, chain_loop):
        gui.current_view().resort()

Last edited by capink; 12-27-2020 at 06:37 PM.
capink is offline   Reply With Quote