mirror of
https://github.com/nzbget/nzbget.git
synced 2026-04-24 14:56:53 -04:00
added new return code (93) for post-processing script to indicate successful processing; that results in cleaning up of download queue if option <ParCleanupQueue> is active
This commit is contained in:
@@ -54,6 +54,7 @@ extern char* (*szEnvironmentVariables)[];
|
||||
|
||||
static const int POSTPROCESS_PARCHECK_CURRENT = 91;
|
||||
static const int POSTPROCESS_PARCHECK_ALL = 92;
|
||||
static const int POSTPROCESS_ALLOK = 93;
|
||||
|
||||
#ifndef WIN32
|
||||
#define CHILD_WATCHDOG 1
|
||||
@@ -647,9 +648,16 @@ void PostScriptController::Run()
|
||||
SetEnvVar(szVarname, pParameter->GetValue());
|
||||
}
|
||||
|
||||
#ifndef DISABLE_PARCHECK
|
||||
int iResult = Execute();
|
||||
if (iResult == POSTPROCESS_PARCHECK_ALL)
|
||||
|
||||
if (iResult == POSTPROCESS_ALLOK)
|
||||
{
|
||||
info("%s sucessful", szInfoName);
|
||||
m_pPostInfo->SetRequestParCleanup(true);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_PARCHECK
|
||||
else if (iResult == POSTPROCESS_PARCHECK_ALL)
|
||||
{
|
||||
if (m_pPostInfo->GetParCheck())
|
||||
{
|
||||
@@ -681,8 +689,6 @@ void PostScriptController::Run()
|
||||
m_pPostInfo->SetRequestParCheck(PostInfo::rpCurrent);
|
||||
}
|
||||
}
|
||||
#else
|
||||
Execute();
|
||||
#endif
|
||||
|
||||
m_pPostInfo->SetStage(PostInfo::ptFinished);
|
||||
|
||||
Reference in New Issue
Block a user