mirror of
https://github.com/nzbget/nzbget.git
synced 2026-04-24 14:56:53 -04:00
added support for postprocess-parameters; new subcommand <O> of remote command <E> to add/modify pp-parameter for group (nzb-file); new XML-/JSON-RPC-subcommand <GroupSetParameter> of method <editqueue> for the same purpose; updated example configuration file and example postprocess-script to indicate new method of passing arguments via environment variables
This commit is contained in:
@@ -615,6 +615,15 @@ void PostScriptController::Run()
|
||||
SetEnvVar("NZBPP_PARFAILED", szHasFailedParJobs);
|
||||
SetEnvVar("NZBPP_CATEGORY", m_pPostInfo->GetCategory());
|
||||
|
||||
for (NZBParameterList::iterator it = m_pPostInfo->GetParameters()->begin(); it != m_pPostInfo->GetParameters()->end(); it++)
|
||||
{
|
||||
NZBParameter* pParameter = *it;
|
||||
char szVarname[1024];
|
||||
snprintf(szVarname, sizeof(szVarname), "NZBPR_%s", pParameter->GetName());
|
||||
szVarname[1024-1] = '\0';
|
||||
SetEnvVar(szVarname, pParameter->GetValue());
|
||||
}
|
||||
|
||||
#ifndef DISABLE_PARCHECK
|
||||
int iResult = Execute();
|
||||
if (iResult == POSTPROCESS_PARCHECK_ALL)
|
||||
|
||||
Reference in New Issue
Block a user