Looking for a Script to set high priority based on nzb age

Come up with a useful post-processing script? Share it here!
Post Reply
Janis
Newbie
Newbie
Posts: 1
Joined: February 1st, 2020, 4:34 am

Looking for a Script to set high priority based on nzb age

Post by Janis »

Hello guys,
Im looking for a script to set a high priority for incoming nzb‘s, based on file age (let‘s say max. 7 days).
I know there is an option in sonarr/radarr to automatically set high priority for episodes that aired in the last days or movies that just got released. While this works for a lot of files, it doesn‘t work for german dubbed episodes and movies that sometimes get released months after their original air dates.
Most of the time my download queue is huge and it takes several days for these files to get downloaded.
At the moment I have a workaround by calling the API url to sort the download queue by age via cronjob every minute.
While this kinda works, it‘s messing up the download order for all other downloads and sometimes pushing back downloads with very old file age to the end of the queue every time and prevents downloading.
Is it possible to write a pre-queue script for this? I don‘t know where to start and could really use some help.
Thank you very much

User avatar
safihre
Administrator
Administrator
Posts: 3973
Joined: April 30th, 2015, 7:35 am
Location: Switzerland
Contact:

Re: Looking for a Script to set high priority based on nzb age

Post by safihre »

In Config > Switches there is a switch "Sort by Age" (enable Advanced Settings), which sorts the queue by age every time a new job is added :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate

Post Reply