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?
Pre-queue script analyze nzb file
Re: Pre-queue script analyze nzb file
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.
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.
Re: Pre-queue script analyze nzb file
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.
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.
