nzbgetcom / nzbget

Efficient usenet downloader
https://nzbget.com
GNU General Public License v2.0
307 stars 16 forks source link

Support for copies of installed scripts #183

Open rEes9P opened 6 months ago

rEes9P commented 6 months ago

Is there already an issue for this request?

Platform

macOS

Describe the enhancement you'd like

Thank you so very much for the passion and work you've put into this project and for being so open to feedback and requests! It is great to see the extension support in v23 and it is working flawlessly for me. I do, however, miss the ability to have multiple versions of an installed script, which was possible earlier with just copying the script and giving it another name. Let's see if I can explain this in a way that makes sense!

I can see this applying to scripts like VideoSort, that can move the final file to a particular folder, so let's stick with that example. If I want to maintain two movie libraries, earlier I could have two copies of the VideoSort script and configure each to rename and save the file in a location of my choosing. I could then have different categories in NZBGet that call upon the version of VideoSort that I would like based on the film. So, for example, I could have a category Movies for my main movie library that calls upon VideoSort and then a category called Foreign that calls upon a copy of the VideoSort script, named VideoSortForeign, for foreign films and thereby save them in a different location. I tried to replicate this by physically copying the VideoSort folder (I am referring to the new 10.0 version) and renaming the .py script file but couldn't get it to work.

I hope I have described the feature request in a not too convoluted manner. Thanks again!

Extra information

No response

dnzbk commented 6 months ago

To achieve such a behavior it's only needed to slightly modify the manifest.json file which contains all metadata about the extension. No need to rename the python script. In your case, just open:

VideoSortForeign/manifest.json

and make the following changes:

"name": "VideoSort", to "name": "VideoSortForeign", "displayName": "Video Sort", to "displayName": "Video Sort Foreign",

and refresh the page in the browser.

After that, everything should start working as expected.

rEes9P commented 6 months ago

Ah, that's great! Thank you so much. I will try it out when I get to my system. Will the renamed scripts update to new versions in the future?

dnzbk commented 6 months ago

It's not supposed to. The Extension manager focuses on the names presented in the extensions list. Since it cannot find VideoSortForeign in the list, it will consider that extension as your custom one.

I think we can consider about adding a feature like the cloning extension for cases like this if it's in such need.