added new option <InterDir> to put intermediate files during download into a separate directory (instead of storing them directly in destination directory (option <DestDir>); when nzb-file is completely (successfully) downloaded, repaired (if neccessary) and unpacked the files are moved to destination directory (option <DestDir> or <CategoryX.DestDir>); intermediate directory can significantly improve unpack performance if it is located on a separate physical hard drive

This commit is contained in:
Andrey Prygunkov
2013-03-01 20:32:17 +00:00
parent 5cf4b4663f
commit 382faa49cb
13 changed files with 301 additions and 67 deletions

View File

@@ -616,8 +616,6 @@ void ScriptController::PrintMessage(Message::EKind eKind, const char* szFormat,
void PostScriptController::StartScriptJob(PostInfo* pPostInfo, bool bNZBFileCompleted, bool bHasFailedParJobs)
{
info("Executing post-process-script for %s", pPostInfo->GetInfoName());
PostScriptController* pScriptController = new PostScriptController();
pScriptController->m_pPostInfo = pPostInfo;
pScriptController->SetScript(g_pOptions->GetPostProcess());
@@ -626,7 +624,7 @@ void PostScriptController::StartScriptJob(PostInfo* pPostInfo, bool bNZBFileComp
pScriptController->m_bHasFailedParJobs = bHasFailedParJobs;
pScriptController->SetAutoDestroy(false);
pPostInfo->SetScriptThread(pScriptController);
pPostInfo->SetPostThread(pScriptController);
pScriptController->Start();
}
@@ -715,6 +713,8 @@ void PostScriptController::Run()
g_pDownloadQueueHolder->UnlockQueue();
info("Executing post-process-script for %s", g_pOptions->GetAllowReProcess() ? m_pPostInfo->GetInfoName() : szNZBName);
int iResult = Execute();
szInfoName[0] = 'P'; // uppercase