Category Prioritization Scan Script?

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
Post Reply
jeeperv6
Posts: 4
Joined: 21 Aug 2016, 02:31
Location: Middle of Canada

Category Prioritization Scan Script?

Post by jeeperv6 » 22 Dec 2019, 14:40

I normally bulk add nzb's via the Import directory with sub-directories for the categories: Movies, TV, Music, etc. I would like to put Music at a lower priority download than Movies or TV. I've been doing this manually, but if I have a large download queue, it's become tedious.

I know this can by done with a script. But I have no experience in scripting & have trouble understanding the python commands. I've looked in the Extension Scripts forum and haven't been able to find one that does what I'd like to do. Or one that I could figure out how to modify to get what I would like to do. Would anyone be willing to do a basic script?

Basically, all I want is that if the nzbs are in the Music category, they're marked very low on the priority scale.

Or could I request this as a future feature request in NZBGet?

Thank you for any help or info.

Jeeperv6

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

Re: Category Prioritization Scan Script?

Post by hugbug » 31 Dec 2019, 23:39

This script can be very small. All you need is to print text "[NZB] PRIORITY=-100" as explained in Scan Scripts. Then you assign your script to your category in NZBGet settings.

If you know Windows Batch or Linux Bash you can write the script in these language. What is your OS?

jeeperv6
Posts: 4
Joined: 21 Aug 2016, 02:31
Location: Middle of Canada

Re: Category Prioritization Scan Script?

Post by jeeperv6 » 01 Jan 2020, 20:39

Hi Hugbug,

I'm currently running Windows Server 2016 with Python 2.7 installed for a couple of other NZBGet scripts I have running.

I know enough to make a script do:

print("[NZB] PRIORITY=-100")

I wasn't sure if I needed something more complicated or whether it had to be a global script or a category specific script.

Thank you for clarifying this for me and pointing me in the right direction!

Happy new year, btw.

jeeperv6

jrtwynam
Posts: 3
Joined: 21 Oct 2020, 16:40

Re: Category Prioritization Scan Script?

Post by jrtwynam » 22 Oct 2020, 16:42

Hi,

I'm trying to set up a scan script to do this. This is what I have:

Code: Select all

########################################
### NZBGET SCAN SCRIPT    ###

# This script will attempt to adjust the NZB priority based on the category.

### NZBGET SCAN SCRIPT     ###
#########################################


echo "[NZB] PRIORITY=50"
I can see that the script is being executed when I import an NZB file, but it's not actually updating the priority of the NZB:
Messages.png
Am I missing something? I'm running NZBGet on Windows 7.

jrtwynam
Posts: 3
Joined: 21 Oct 2020, 16:40

Re: Category Prioritization Scan Script?

Post by jrtwynam » 25 Oct 2020, 04:13

Well that was embarrassing. My issue was the quotes in the "echo" command - as soon as I got rid of those, it worked fine.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests