[New Feature] Unified extension scripts settings

Discuss newly added features or request new features.
Post Reply
hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

[New Feature] Unified extension scripts settings

Post by hugbug » 15 Dec 2016, 10:17

That's a copy of GitHub issue Unified extension scripts settings for script authors who doesn't monitor GitHub issue tracker.

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
All these script settings palette is confusing. What I want to do is to reduce the amount of settings, ideally to one - let's call it Extensions. Well, that'd be too good, we still need more than one:
  • 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.
That's almost one setting, if we don't count overrides and scheduler.

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.

Image

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:
Certain 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.
About scan-scripts
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.

kloaknet
Posts: 337
Joined: 23 Jul 2014, 08:52

Re: [New Feature] Unified extension scripts settings

Post by kloaknet » 17 Dec 2016, 10:43

I think it is worth it to try to simplify it too. E.g. for the Completion.py it might be confusing how to enable it as a Scan, Queue and Scheduler script. If it works all from less settings, it will be definitly be an improvement.

regarding the CategoryX.Extensions option, I would like to suggest to add the same option the Extensions, as well on the Category pages (but of course both referring to the same settings) to make it less confusing too. Maybe this is also an idea for FeedX.Extensions?

I dont have experiences with slow loading of scripts, as the completion script for me loads in like 1 or 2 sec for about 70 kb of file size, but thats on a Athlon 5350 pc with an SSD. Does it takes so much more time on something like a limited NAS to load? They also have limitations on achievable download speed), I guess only effectively delaying a download like 1% or 2% when it is loaded for every rar file? But of course, every speed/load improvement is a welcome feature :!:

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [New Feature] Unified extension scripts settings

Post by hugbug » 17 Dec 2016, 13:11

regarding the CategoryX.Extensions option, I would like to suggest to add the same option the Extensions, as well on the Category pages (but of course both referring to the same settings) to make it less confusing too. Maybe this is also an idea for FeedX.Extensions?
Isn't that exactly what I'm doing? I'll send you the develop version to try.

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests