fixed: the program could crash during executing of queue-scripts (bug introduced in r1094); the list of queue-scripts is now read only once, at program start; queue-scripts added to scripts-directory after the program was started can be selected in download details dialog on page "Postprocess" but will not be executed until the program is restarted

This commit is contained in:
Andrey Prygunkov
2014-08-19 19:47:49 +00:00
parent 74a1f6301a
commit 1a76c72bf3

View File

@@ -459,7 +459,6 @@ QueueScriptCoordinator::~QueueScriptCoordinator()
void QueueScriptCoordinator::InitOptions()
{
m_ScriptList.Clear();
g_pOptions->LoadScriptList(&m_ScriptList);
m_bHasQueueScripts = false;
@@ -476,20 +475,13 @@ void QueueScriptCoordinator::InitOptions()
void QueueScriptCoordinator::EnqueueScript(NZBInfo* pNZBInfo, EEvent eEvent)
{
m_mutexQueue.Lock();
if (eEvent == qeNzbAdded || eEvent == qeNzbDownloaded)
{
// reread script list on important events
InitOptions();
}
if (!m_bHasQueueScripts)
{
m_mutexQueue.Unlock();
return;
}
m_mutexQueue.Lock();
if (eEvent == qeNzbDownloaded)
{
// delete all other queued scripts for this nzb