Script to send downloaded NZB files back to NZBGet?

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
Tensai
Posts: 3
Joined: 31 Jan 2017, 08:42

Script to send downloaded NZB files back to NZBGet?

Post by Tensai » 31 Jan 2017, 08:55

Hi all

I have already searched a lot for such a script but found nothing.
I am looking for a post-processing script, which will do the following (after repair and unrar):
  1. Check if the extracted download contains a NZB file: If yes -> go to 2. / if no end
  2. Check if found NZB file is identical to the original NZB file of this download: if no -> go to 3. / if yes -> end (explanation see below)
  3. Send the found NZB file to the NZBGet queue using the same category and password (if any) as used for this download
Explanation for step 2: this is to prevent that some downloads which also include the NZB file itself are downloaded repeatedly.

Reason for this request is the fact, that some usenet downloads are "encrypted" twice. Meaning that the usenet search engines only point to a NZB files for a password protected rar file containing the actual NZB file for the actual download, which again is password protected with the same password as used for the rar file of the NZB file.

Does someone know of such a script or is able to write one?

Your help would be highly appreciated!

Regards, Tensai

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

Re: Script to send downloaded NZB files back to NZBGet?

Post by kloaknet » 04 Feb 2017, 08:47

I think you should take a look at videosort or easysort, change the settings in it, and let it move nzb files back to the nzbdir, might require tweaking some settings in it, but ill guess it will do the job. If you already have a copy of one of the scripts running, just rename the videosort folder and script name to something else.

Tensai
Posts: 3
Joined: 31 Jan 2017, 08:42

Re: Script to send downloaded NZB files back to NZBGet?

Post by Tensai » 08 Feb 2017, 12:46

Thanks for your suggestion.

I took a look at those scripts and from what I understand, they can only move and rename files. In theory I certainly could configure them to move downloaded *.nzb files back to the nzb watch folder. But still the category and the password would be missing. See step 3 of what the script should be able to do:
  1. Check if the extracted download contains a NZB file: If yes -> go to 2. / if no end
  2. Check if found NZB file is identical to the original NZB file of this download: if no -> go to 3. / if yes -> end (explanation see below)
  3. Send the found NZB file to the NZBGet queue using the same category and password (if any) as used for this download
Also step 2 would not be possible with those scripts.

I only programmed in php so far but I will probably have to dig into python and find out how to code this myself...

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

Re: Script to send downloaded NZB files back to NZBGet?

Post by kloaknet » 08 Feb 2017, 15:47

hmm, forgot about the password part,

but ill suggest to somehow base your script on tricks in the easysort script (simple videosort), may also take a look at

http://forum.nzbget.net/viewtopic.php?f=8&t=2163
http://forum.nzbget.net/viewtopic.php?f=8&t=1600
http://forum.nzbget.net/viewtopic.php?f=8&t=1391

for some guidance. Beside the exmple scripts hugbug has put a ton of stuff on the wiki:

https://github.com/nzbget/nzbget/wiki/Extension-scripts
https://github.com/nzbget/nzbget/wiki/P ... ng-scripts
https://github.com/nzbget/nzbget/wiki/API

and coding in python is rather simple, and can easily be done in notepad++

Tensai
Posts: 3
Joined: 31 Jan 2017, 08:42

Re: Script to send downloaded NZB files back to NZBGet?

Post by Tensai » 09 Feb 2017, 08:43

Many thanks again for your support.

Obviously I will have to read a lot, but I will take your suggestions into consideration.
After a first glance at the code, especially the PasswordDetector script seems promising and I might be able to use a a lot of it for my script.

I will definitely take this very appealing challenge to finally get myself acquainted with python. I only have to find the time... :shock:

Regards, Tensai

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests