Page 1 of 1

Send nzb url to postprocess script.

Posted: July 22nd, 2010, 3:33 pm
by ddlshack
It would be good if it would send the url that the nzb was downloaded from to the postprocess script. This would allow you to parse the post ID on Nzbmatrix, for example, and scrape the post information.

I attempted to add another parameter by:

Code: Select all

adding
             nzburl = nzo.get_future()
to line 226 in postproc.py

Code: Select all

changing
                            script_log, script_ret = external_processing(script_path, workdir_complete, nzo.get_filename(), msgid, dirname, cat, group, jobResult)
to
                            script_log, script_ret = external_processing(script_path, workdir_complete, nzo.get_filename(), msgid, dirname, cat, group, jobResult, nzburl)
in postproc.py line 393

Code: Select all

changing
def external_processing(extern_proc, complete_dir, filename, msgid, nicename, cat, group, status):
to
def external_processing(extern_proc, complete_dir, filename, msgid, nicename, cat, group, status, nzburl=''):
in newunpack.py line 118

Code: Select all

and changing
               str(nicename), str(msgid), str(cat), str(group), str(status)]
to
               str(nicename), str(msgid), str(cat), str(group), str(status), str(nzburl)]
in newsunpack.py line 121
but it just sent a blank parameter to my postprocess script.