Feel free to discuss on GitHub or in this forum topic.
Idea
Currently we have:
- option PostScript
- option QueueScript
- option ScanScript
- option ServiceScript (see Service scripts - a new kind of extension scripts)
- option FeedScript
- option CategoryX.PostScript
- option FeedX.FeedScript
- option TaskX.Command=Script with TaskX.Param
- option Extensions: combines "PostScript", "QueueScript", "ScanScript", "FeedScript" and the new "ServiceScript";
- option CategoryX.Extensions for per-category overrides;
- option FeedX.Extensions for per-feed overrides;
- scheduler options TaskX.Command and
- TaskX.Param remain unchanged.
So, now to install a new script the user have to select it in option "Extensions"; no need to think about which option to use, regardless of script kind, be it a post-processing script, scan-script or queue-script. Only script developers need to know differences.
Upcoming service-scripts (#318) will not be selectable per-nzb and will rather run globally. Does it work well with the general concept of option "Extensions" providing **defaults** for new downloads? I hope to cover this with the note from description:
About scan-scriptsCertain extensions work globally for the whole program instead of per-nzb basis. Such extensions are activated once and cannot be overridden per category or per nzb.
In v17 scan-scripts are selected globally. Unified option "Extensions" tries to be per-nzb (and per-category) whenever possible, which the exception for service-script mentioned above.
In new implementation the scan-scripts work on per-category basis. When nzb-file is added to queue and it has a category the scan-scripts are chosen from CategoryX.Extensions (if it's not empty).
Users using per-category (post-processing) scripts must not forget to select scan-scripts in category as well. That can be see as inconvenience but on the other side provides more flexibility.
Can we live with the change?
About queue-scripts
In v17 queue-scripts can be selected either via "QueueScript" or "PostScript" (if the script is declared as both queue-script and post-script). This makes it possible to select script globally (using "QueueScript") or per-nzb (or per-category) via "PostScript".
In new implementation queue-scripts work on per-nzb (or per-category) basis. Similarly to scan-scripts, users using per-category (post-processing) scripts must not forget to select queue-scripts in category as well (or the queue-scripts will not run for that category).
Can we live with the change?
Implementation
A working implementation is available in branch 311-extensions. I'm asking (dear) script authors to validate it in both theory and practice. If you can't compile please let me know and I'll provide installer packages.
Note: migration of old settings is currently not completely implemented. Only option "PostScript" is migrated into option "Extensions". The migration of other script-options will be added later.