Pre-queue script analyze nzb file

Want something added? Ask for it here.
Post Reply
letsa
Newbie
Newbie
Posts: 2
Joined: August 14th, 2013, 4:04 am

Pre-queue script analyze nzb file

Post by letsa »

I want to make a pre-queue script that analyzes an nzb file's contents to determine whether to queue the file.

Pre-queue scripts get passed the NZB's *filename*, but I'd like to know where this NZB file is stored (the actual path) so I can analyze it further. Because the NZB has not been queued yet, it won't be in the NZB Backup Folder; where is the NZB file located once the pre-queue script is called?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Pre-queue script analyze nzb file

Post by shypike »

There's no single location.
It depends on how the NZB enter the queue.
Most of the time the NZB will only be in memory.
A later release may get a fixed (temp) location for the file.
letsa
Newbie
Newbie
Posts: 2
Joined: August 14th, 2013, 4:04 am

Re: Pre-queue script analyze nzb file

Post by letsa »

So, there's no way to interpret the actual NZB file in a pre-queue script and extract metadata like subject line and/or file names prior to queuing?

One could check the 'scan folders' for NZBs, but in my case the NZBs are downloaded from various RSS feeds. Perhaps it would be possible for the script, given the NZB filename, to access the RSS and wget the NZB again from there. Then if the size matches (as the feed can have multiple NZBs with the same name), process it.

Seems rather cumbersome, but perhaps it will still work. :)
Post Reply