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:
Andrey Prygunkov
2008-11-29 23:42:24 +00:00
parent 63cfccab40
commit 42718d3f7a
20 changed files with 632 additions and 415 deletions

View File

@@ -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)