mirror of
https://github.com/nzbget/nzbget.git
synced 2026-01-05 12:37:59 -05:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7930b56a6 | ||
|
|
b2bf488d59 | ||
|
|
8e4b75b21e | ||
|
|
5b17bebbd6 | ||
|
|
bda1eaa192 | ||
|
|
4bcdbbeb09 |
@@ -1,3 +1,10 @@
|
||||
nzbget-18.1:
|
||||
- fixed: crash during download caused by a race condition;
|
||||
- fixed: sleep mode did not work on Windows;
|
||||
- fixed: queue was not saved after deleting of queued post-jobs;
|
||||
- fixed: possible crash at the end of post-processing;
|
||||
- fixed: "undefined" in reorder extension scripts.
|
||||
|
||||
nzbget-18.0:
|
||||
- automatic deobfuscation of rar-archives without par-files:
|
||||
- obfuscated downloads not having par-files can now be successfully
|
||||
|
||||
20
configure
vendored
20
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.61 for nzbget 18.0.
|
||||
# Generated by GNU Autoconf 2.61 for nzbget 18.1.
|
||||
#
|
||||
# Report bugs to <hugbug@users.sourceforge.net>.
|
||||
#
|
||||
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='nzbget'
|
||||
PACKAGE_TARNAME='nzbget'
|
||||
PACKAGE_VERSION='18.0'
|
||||
PACKAGE_STRING='nzbget 18.0'
|
||||
PACKAGE_VERSION='18.1'
|
||||
PACKAGE_STRING='nzbget 18.1'
|
||||
PACKAGE_BUGREPORT='hugbug@users.sourceforge.net'
|
||||
|
||||
ac_unique_file="daemon/main/nzbget.cpp"
|
||||
@@ -1255,7 +1255,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures nzbget 18.0 to adapt to many kinds of systems.
|
||||
\`configure' configures nzbget 18.1 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1326,7 +1326,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of nzbget 18.0:";;
|
||||
short | recursive ) echo "Configuration of nzbget 18.1:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1477,7 +1477,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
nzbget configure 18.0
|
||||
nzbget configure 18.1
|
||||
generated by GNU Autoconf 2.61
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@@ -1491,7 +1491,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by nzbget $as_me 18.0, which was
|
||||
It was created by nzbget $as_me 18.1, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2287,7 +2287,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='nzbget'
|
||||
VERSION='18.0'
|
||||
VERSION='18.1'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -12210,7 +12210,7 @@ exec 6>&1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by nzbget $as_me 18.0, which was
|
||||
This file was extended by nzbget $as_me 18.1, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -12263,7 +12263,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
nzbget config.status 18.0
|
||||
nzbget config.status 18.1
|
||||
configured by $0, generated by GNU Autoconf 2.61,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(nzbget, 18.0, hugbug@users.sourceforge.net)
|
||||
AC_INIT(nzbget, 18.1, hugbug@users.sourceforge.net)
|
||||
AC_CONFIG_AUX_DIR(posix)
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
|
||||
@@ -514,6 +514,7 @@ NzbInfo* PrePostProcessor::PickNextJob(DownloadQueue* downloadQueue, bool allowP
|
||||
(!nzbInfo || nzbInfo1->GetPriority() > nzbInfo->GetPriority()) &&
|
||||
(!g_Options->GetPausePostProcess() || nzbInfo1->GetForcePriority()) &&
|
||||
(allowPar || !nzbInfo1->GetPostInfo()->GetNeedParCheck()) &&
|
||||
(std::find(m_activeJobs.begin(), m_activeJobs.end(), nzbInfo1) == m_activeJobs.end()) &&
|
||||
IsNzbFileCompleted(nzbInfo1, true))
|
||||
{
|
||||
nzbInfo = nzbInfo1;
|
||||
@@ -541,8 +542,6 @@ void PrePostProcessor::CheckPostQueue()
|
||||
break;
|
||||
}
|
||||
|
||||
Util::SetStandByMode(false);
|
||||
|
||||
m_activeJobs.push_back(postJob);
|
||||
|
||||
PostInfo* postInfo = postJob->GetPostInfo();
|
||||
@@ -561,6 +560,8 @@ void PrePostProcessor::CheckPostQueue()
|
||||
downloadQueue->Save();
|
||||
UpdatePauseState();
|
||||
}
|
||||
|
||||
Util::SetStandByMode(m_activeJobs.empty());
|
||||
}
|
||||
|
||||
void PrePostProcessor::StartJob(DownloadQueue* downloadQueue, PostInfo* postInfo, bool allowPar)
|
||||
@@ -847,6 +848,14 @@ bool PrePostProcessor::PostQueueDelete(DownloadQueue* downloadQueue, IdList* idL
|
||||
postInfo->GetNzbInfo()->PrintMessage(Message::mkInfo,
|
||||
"Deleting queued post-job %s", postInfo->GetNzbInfo()->GetName());
|
||||
JobCompleted(downloadQueue, postInfo);
|
||||
|
||||
m_activeJobs.erase(std::remove_if(m_activeJobs.begin(), m_activeJobs.end(),
|
||||
[postInfo](NzbInfo* postJob)
|
||||
{
|
||||
return postInfo == postJob->GetPostInfo();
|
||||
}),
|
||||
m_activeJobs.end());
|
||||
|
||||
ok = true;
|
||||
}
|
||||
break;
|
||||
@@ -854,5 +863,10 @@ bool PrePostProcessor::PostQueueDelete(DownloadQueue* downloadQueue, IdList* idL
|
||||
}
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
downloadQueue->Save();
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
@@ -568,12 +568,14 @@ void QueueCoordinator::ArticleCompleted(ArticleDownloader* articleDownloader)
|
||||
debug("Article downloaded");
|
||||
|
||||
FileInfo* fileInfo = articleDownloader->GetFileInfo();
|
||||
NzbInfo* nzbInfo = fileInfo->GetNzbInfo();
|
||||
ArticleInfo* articleInfo = articleDownloader->GetArticleInfo();
|
||||
bool retry = false;
|
||||
bool fileCompleted = false;
|
||||
bool completeFileParts = false;
|
||||
|
||||
{
|
||||
NzbInfo* nzbInfo = fileInfo->GetNzbInfo();
|
||||
ArticleInfo* articleInfo = articleDownloader->GetArticleInfo();
|
||||
bool retry = false;
|
||||
bool fileCompleted = false;
|
||||
|
||||
GuardedDownloadQueue downloadQueue = DownloadQueue::Guard();
|
||||
|
||||
if (articleDownloader->GetStatus() == ArticleDownloader::adFinished)
|
||||
@@ -642,35 +644,44 @@ void QueueCoordinator::ArticleCompleted(ArticleDownloader* articleDownloader)
|
||||
{
|
||||
fileCompleted = true;
|
||||
}
|
||||
|
||||
completeFileParts = fileCompleted && (!fileInfo->GetDeleted() || nzbInfo->GetParking());
|
||||
|
||||
if (!completeFileParts)
|
||||
{
|
||||
DeleteDownloader(downloadQueue, articleDownloader, false);
|
||||
}
|
||||
}
|
||||
|
||||
bool deleteFileObj = false;
|
||||
|
||||
if (fileCompleted && (!fileInfo->GetDeleted() || nzbInfo->GetParking()))
|
||||
if (completeFileParts)
|
||||
{
|
||||
// all jobs done
|
||||
articleDownloader->CompleteFileParts();
|
||||
fileInfo->SetPartialChanged(false);
|
||||
deleteFileObj = true;
|
||||
}
|
||||
|
||||
{
|
||||
GuardedDownloadQueue downloadQueue = DownloadQueue::Guard();
|
||||
DeleteDownloader(downloadQueue, articleDownloader, true);
|
||||
}
|
||||
}
|
||||
|
||||
bool hasOtherDownloaders = fileInfo->GetActiveDownloads() > 1;
|
||||
deleteFileObj |= fileInfo->GetDeleted() && !hasOtherDownloaders;
|
||||
void QueueCoordinator::DeleteDownloader(DownloadQueue* downloadQueue,
|
||||
ArticleDownloader* articleDownloader, bool fileCompleted)
|
||||
{
|
||||
FileInfo* fileInfo = articleDownloader->GetFileInfo();
|
||||
NzbInfo* nzbInfo = fileInfo->GetNzbInfo();
|
||||
bool hasOtherDownloaders = fileInfo->GetActiveDownloads() > 1;
|
||||
bool deleteFileObj = fileCompleted || (fileInfo->GetDeleted() && !hasOtherDownloaders);
|
||||
|
||||
// remove downloader from downloader list
|
||||
m_activeDownloads.erase(std::find(m_activeDownloads.begin(), m_activeDownloads.end(), articleDownloader));
|
||||
// remove downloader from downloader list
|
||||
m_activeDownloads.erase(std::find(m_activeDownloads.begin(), m_activeDownloads.end(), articleDownloader));
|
||||
|
||||
fileInfo->SetActiveDownloads(fileInfo->GetActiveDownloads() - 1);
|
||||
nzbInfo->SetActiveDownloads(nzbInfo->GetActiveDownloads() - 1);
|
||||
fileInfo->SetActiveDownloads(fileInfo->GetActiveDownloads() - 1);
|
||||
nzbInfo->SetActiveDownloads(nzbInfo->GetActiveDownloads() - 1);
|
||||
|
||||
if (deleteFileObj)
|
||||
{
|
||||
DeleteFileInfo(downloadQueue, fileInfo, fileCompleted);
|
||||
downloadQueue->Save();
|
||||
}
|
||||
if (deleteFileObj)
|
||||
{
|
||||
DeleteFileInfo(downloadQueue, fileInfo, fileCompleted);
|
||||
downloadQueue->Save();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ private:
|
||||
bool GetNextArticle(DownloadQueue* downloadQueue, FileInfo* &fileInfo, ArticleInfo* &articleInfo);
|
||||
void StartArticleDownload(FileInfo* fileInfo, ArticleInfo* articleInfo, NntpConnection* connection);
|
||||
void ArticleCompleted(ArticleDownloader* articleDownloader);
|
||||
void DeleteDownloader(DownloadQueue* downloadQueue, ArticleDownloader* articleDownloader, bool fileCompleted);
|
||||
void DeleteFileInfo(DownloadQueue* downloadQueue, FileInfo* fileInfo, bool completed);
|
||||
void CheckHealth(DownloadQueue* downloadQueue, FileInfo* fileInfo);
|
||||
void ResetHangingDownloads();
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\daemon\connect;.\daemon\extension;.\daemon\feed;.\daemon\frontend;.\daemon\main;.\daemon\nserv;.\daemon\nntp;.\daemon\postprocess;.\daemon\queue;.\daemon\remote;.\daemon\util;.\daemon\windows;.\lib\par2;.\windows\resources;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;PACKAGE="nzbget";VERSION="18.0";_DEBUG;_CONSOLE;DEBUG;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;PACKAGE="nzbget";VERSION="18.1";_DEBUG;_CONSOLE;DEBUG;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
@@ -72,7 +72,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.\daemon\connect;.\daemon\extension;.\daemon\feed;.\daemon\frontend;.\daemon\main;.\daemon\nserv;.\daemon\nntp;.\daemon\postprocess;.\daemon\queue;.\daemon\remote;.\daemon\util;.\daemon\windows;.\lib\par2;.\windows\resources;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;PACKAGE="nzbget";VERSION="18.0";NDEBUG;_CONSOLE;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;PACKAGE="nzbget";VERSION="18.1";NDEBUG;_CONSOLE;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
|
||||
@@ -2105,7 +2105,7 @@ var ScriptListDialog = (new function($)
|
||||
|
||||
var availableScripts = [];
|
||||
var availableAllScripts = [];
|
||||
for (var i=1; i < config.length; i++)
|
||||
for (var i=2; i < config.length; i++)
|
||||
{
|
||||
availableAllScripts.push(config[i].scriptName);
|
||||
var accept = !kind;
|
||||
|
||||
Reference in New Issue
Block a user