The default processing scenario is: download -> parcheck -> postprocess.
With delayed parcheck a new scenario is possible: download -> postprocess -> parcheck -> postprocess.
This allows to try unrar first and only if it fails do par-check/repair, then unrar again.
This is achieved by returning a special exit code from post-process-script to request nzbget to do par-check/repair. The value is "28161" (hex 0x6E01 which means "n1" or "nzbget return code 1"). All other return codes are currently ignored, but for future compatibility use value "0", which is a common default result code).
To organize delayed parcheck:
- set options: LoadPars=one, ParCheck=no, ParRepair=yes;
- in post-process-script check the parameter "result of par-check". If it is "0", that means, the script is called the first time. Try to unpack files. If unpack fails, exit the script with magic return value;
- nzbget will start par-check/repair. After that it calls the script again;
- on second pass the parameter "result of par-check" will have value greater than "0". If it is "2" ("checked and successfully repaired") you can try unpack again.
Implemented in revision 242.