diff --git a/daemon/extension/PostScript.cpp b/daemon/extension/PostScript.cpp index ecb9d1d7..f53e7e46 100644 --- a/daemon/extension/PostScript.cpp +++ b/daemon/extension/PostScript.cpp @@ -118,6 +118,7 @@ void PostScriptController::PrepareParams(const char* scriptName) SetEnvVar("NZBPP_NZBNAME", m_postInfo->GetNzbInfo()->GetName()); SetEnvVar("NZBPP_DIRECTORY", m_postInfo->GetNzbInfo()->GetDestDir()); SetEnvVar("NZBPP_NZBFILENAME", m_postInfo->GetNzbInfo()->GetFilename()); + SetEnvVar("NZBPP_QUEUEDFILE", m_postInfo->GetNzbInfo()->GetQueuedFilename()); SetEnvVar("NZBPP_URL", m_postInfo->GetNzbInfo()->GetUrl()); SetEnvVar("NZBPP_FINALDIR", m_postInfo->GetNzbInfo()->GetFinalDir()); SetEnvVar("NZBPP_CATEGORY", m_postInfo->GetNzbInfo()->GetCategory()); diff --git a/daemon/extension/QueueScript.cpp b/daemon/extension/QueueScript.cpp index 54523909..1471aa29 100644 --- a/daemon/extension/QueueScript.cpp +++ b/daemon/extension/QueueScript.cpp @@ -51,6 +51,7 @@ private: CString m_url; CString m_category; CString m_destDir; + CString m_queuedFilename; int m_id; int m_priority; CString m_dupeKey; @@ -78,6 +79,7 @@ void QueueScriptController::StartScript(NzbInfo* nzbInfo, ScriptConfig::Script* scriptController->m_url = nzbInfo->GetUrl(); scriptController->m_category = nzbInfo->GetCategory(); scriptController->m_destDir = nzbInfo->GetDestDir(); + scriptController->m_queuedFilename = nzbInfo->GetQueuedFilename(); scriptController->m_id = nzbInfo->GetId(); scriptController->m_priority = nzbInfo->GetPriority(); scriptController->m_dupeKey = nzbInfo->GetDupeKey(); @@ -144,6 +146,7 @@ void QueueScriptController::PrepareParams(const char* scriptName) SetIntEnvVar("NZBNA_NZBID", m_id); SetEnvVar("NZBNA_FILENAME", m_nzbFilename); SetEnvVar("NZBNA_DIRECTORY", m_destDir); + SetEnvVar("NZBNA_QUEUEDFILE", m_queuedFilename); SetEnvVar("NZBNA_URL", m_url); SetEnvVar("NZBNA_CATEGORY", m_category); SetIntEnvVar("NZBNA_PRIORITY", m_priority); diff --git a/nzbget.conf b/nzbget.conf index 4637d904..739a7743 100644 --- a/nzbget.conf +++ b/nzbget.conf @@ -1483,8 +1483,9 @@ UnpackPassFile= # NZBPP_NZBNAME - user-friendly name of processed nzb-file as it is displayed # by the program. The file path and extension are removed. # If download was renamed, this parameter reflects the new name; -# NZBPP_NZBFILENAME - name of processed nzb-file. It includes file extension and also -# may include full path; +# NZBPP_NZBFILENAME - original name of processed nzb-file. It includes file extension +# and may include full path; +# NZBPP_QUEUEDFILE - full filename of the queued (renamed) nzb-file; # NZBPP_FINALDIR - final destination path if set by one of previous pp-scripts; # NZBPP_CATEGORY - category assigned to nzb-file (can be empty string); # NZBPP_DUPEKEY - duplicate key of nzb-file; @@ -1748,7 +1749,8 @@ ScanScript= # In the future the list of supported events may be # extended. To avoid conflicts with future NZBGet # versions the script must exit if the parameter -# has a value unknown to the script. +# has a value unknown to the script; +# NZBNA_QUEUEDFILE - full filename of the queued (renamed) nzb-file; # NZBNA_DELETESTATUS - delete status info, NZBNA_EVENT=NZB_DELETED: # MANUAL - deleted by user or via API call; # HEALTH - deleted by health check;