Version 1.5.0- Update: Calibre Actions: Add option to wait for jobs started by action to finish before proceeding.
- Update: Calibre Actions: Add option to wait for progress bar started by action to finish before proceeding.
- Update: Calibre Actions: re-add previously exluded action like add books, remove books, convert books ... etc as they can be used with newly introduced options.
- Update: Add new event: Library View Double Cliked.
- Update: New template function to_timestamp which makes it possible to do date comparisons by converting date to float numbers.
- Fix: Calibre Actions: Bug that allowed choosing two actions if they are not top level items.
- API changes: Rename some methods.
The biggest change for this version is that Calibre Actions is now able use actions like Add books, convert books ... etc. The reason they were not included is outlined in the quote below:
Quote:
Originally Posted by capink
Calibre Actions does expose most of calibre interface actions, but not all of them are suitable for use with this plugin. The reason is that some of these actions have their own progress bar, so they run the code on a different thread. So whenever you use an of these actions, the next action in the chain will start before they finish because they are on a different thread.
Some other actions, like convert books, run one or more jobs, so the same problem is happening here. There is no way to run these action sequentially with other actions. They can only be used as the last action in a chain.
I have removed some of these actions like add books, remove books, convert books. But I cannot hunt down every possible action that might cause such problems, so you always have to test before using them.
|
The two newly introduced options solve these problems. The first one if checked allows the plugin to detect jobs started by selected action and wait until these jobs are finished, and then proceed with the rest of the chain. The second allows the plugin to detect progress bar started by selected action and block the main thread until the progress bar disappears.
However, there is only one remaining limitation; as the detection of a progress bar fails whenever the user check the "Hide Main Window" from the tray icon. So avoid using these together.
The new double click event can be used to launch chain(s) in response to double clicking items on the library view. It might be better to disable the default action associated with double clicking if you want to use this event. (preferences > tweaks > doubleclick_on_library_view > do_nothing)
Also I am not sure if the functionality of to_timestamp() is already present in calibre's template language. I checked format_date() and it does not seem to offer this possibility. If this is not the case, or if you think such functionality fits better into calibre template language, I will remove this function from future versions.