[REQ] - Post-Job Unpack Monitoring For NZB

Get help, report and discuss bugs.
Post Reply
douche
Posts: 57
Joined: 08 Feb 2014, 23:50

[REQ] - Post-Job Unpack Monitoring For NZB

Post by douche » 09 Feb 2014, 00:04

I'm not sure if I'm missing anything, or the feature doesnt exit, but it would be great if NZBGet would automatically add any NZBs that are unpacked from the file set of a job (sometimes an RSS feed, or a post online will include another NZB containing the real obfuscated content of the release). IE - instead of having the NZB-monitoring directory the same as the completed directory (I'm sure I'm not the only one who doesn't have it setup this way), once the unpacking portion of a job is completed, NZBGet would scan the unpacked files for any NZB files, and then add them to the download queue automatically. Obviously it would be practical to have these NZBs added in a "paused" state, as some releases included NZBs within themselves, I know NZBGet has a great dupe checking feature, but still.

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

Re: [REQ] - Post-Job Unpack Monitoring For NZB

Post by hugbug » 09 Feb 2014, 09:28

This can achieved via a post-processing script. If you need help writing such a script let me know.

douche
Posts: 57
Joined: 08 Feb 2014, 23:50

Re: [REQ] - Post-Job Unpack Monitoring For NZB

Post by douche » 09 Feb 2014, 21:23

hugbug wrote:This can achieved via a post-processing script. If you need help writing such a script let me know.
help would be appreciated.

I'm running Windows7 currently.
- I've got a little experience with some batch scripts, so hopefully you could just steer me in the right direction to get it to work?

speaking of Windows, how does one go about getting newer builds, as you're making revisions?

cheers.

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

Re: [REQ] - Post-Job Unpack Monitoring For NZB

Post by hugbug » 09 Feb 2014, 21:39

Writing windows batch scripts needs way too much brain concentration, simple tasks requires complex code.
I would write a script in python, it easy to write and to read and the script can be used on all platforms.

To avoid queueing of the same (just downloaded) files I would make few extra checks in the script:
  • check the size of all files (including subdirectories); if that size is bigger than defined in the script options (default value could be 50MB) - do nothing;
  • check if the directory have files with certain extensions (mkv, avi, adjustable via script options) and if such files were found - do nothing.
To add nzb-files to queue there are three ways:
  1. copy files into incoming nzb directory (option NzbDir), in the script it's available as env. var "NZBOP_NZBDIR"
  2. add file via remote call (example in python):

    Code: Select all

    call([os.environ['NZBOP_APPBIN'], '-c', os.environ['NZBOP_CONFIGFILE'], '-A', path_to_nzb_file])
  3. using RPC-API - see example in RPC docs.
And when using that script make sure nzb-extension is not listed in option ExtCleanupDisk.

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

Re: [REQ] - Post-Job Unpack Monitoring For NZB

Post by hugbug » 09 Feb 2014, 21:42

I regular make testing releases. Installing them is as easy as unpack over existing install (replacing existing files).

For v13 there were no testing releases yet because it's not reached the stage where it can be publicly tested.

douche
Posts: 57
Joined: 08 Feb 2014, 23:50

Re: [REQ] - Post-Job Unpack Monitoring For NZB

Post by douche » 15 Feb 2014, 07:58

hugbug wrote:Writing windows batch scripts needs way too much brain concentration, simple tasks requires complex code.
I would write a script in python, it easy to write and to read and the script can be used on all platforms.

To avoid queueing of the same (just downloaded) files I would make few extra checks in the script:
  • check the size of all files (including subdirectories); if that size is bigger than defined in the script options (default value could be 50MB) - do nothing;
  • check if the directory have files with certain extensions (mkv, avi, adjustable via script options) and if such files were found - do nothing.
To add nzb-files to queue there are three ways:
  1. copy files into incoming nzb directory (option NzbDir), in the script it's available as env. var "NZBOP_NZBDIR"
  2. add file via remote call (example in python):

    Code: Select all

    call([os.environ['NZBOP_APPBIN'], '-c', os.environ['NZBOP_CONFIGFILE'], '-A', path_to_nzb_file])
  3. using RPC-API - see example in RPC docs.
And when using that script make sure nzb-extension is not listed in option ExtCleanupDisk.
well, in terms of python, and getting this script anywhere...
Image

Thanks anyways, I'm going to have to spend some serious time trying to figure this out, and whether it's really that important to me.

douche
Posts: 57
Joined: 08 Feb 2014, 23:50

Re: [REQ] - Post-Job Unpack Monitoring For NZB

Post by douche » 15 Feb 2014, 07:59

hugbug wrote:I regular make testing releases. Installing them is as easy as unpack over existing install (replacing existing files).

For v13 there were no testing releases yet because it's not reached the stage where it can be publicly tested.
thanks for the info, looking forward to the many new improvements!

cheers.

Post Reply

Who is online

Users browsing this forum: No registered users and 43 guests