mirror of
https://github.com/nzbget/nzbget.git
synced 2026-01-05 20:48:09 -05:00
Compare commits
16 Commits
v21.0
...
v21.1-r232
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d008bd1f5 | ||
|
|
8c1e62ef49 | ||
|
|
e18c25c231 | ||
|
|
6dbe6edbab | ||
|
|
1ee8e02586 | ||
|
|
f8f9dd2b6d | ||
|
|
414ffcbc35 | ||
|
|
0522b5f49d | ||
|
|
575b823758 | ||
|
|
a124a91a84 | ||
|
|
4546b0f368 | ||
|
|
625e7a61e1 | ||
|
|
f1c1373c7d | ||
|
|
5dda6b2e49 | ||
|
|
81aa56324f | ||
|
|
a8533e7f0a |
41
COPYING
41
COPYING
@@ -1,12 +1,12 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
@@ -225,7 +225,7 @@ impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
@@ -303,10 +303,9 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
@@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names:
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
@@ -1,3 +1,7 @@
|
||||
nzbget-21.1:
|
||||
- please see repository change log at
|
||||
https://github.com/nzbget/nzbget/commits/develop
|
||||
|
||||
nzbget-21.0:
|
||||
- reworked duplicate handling to support URLs, especially when using RSS
|
||||
feeds:
|
||||
|
||||
15
README.md
15
README.md
@@ -11,14 +11,9 @@
|
||||
NZBGet is a binary downloader, which downloads files from Usenet
|
||||
based on information given in nzb-files.
|
||||
|
||||
NZBGet is written in C++ and is known for its extraordinary performance and efficiency.
|
||||
NZBGet is written in C++ and is known for its performance and efficiency.
|
||||
|
||||
NZBGet can be run on almost every device - classic PCs, NAS, media players, SAT-receivers, WLAN-routers, etc.
|
||||
The download area provides precompiled binaries
|
||||
for Windows, macOS, Linux (compatible with many CPUs and platform variants), FreeBSD and Android. For other platforms
|
||||
the program can be compiled from sources.
|
||||
|
||||
- [Home page (nzbget.net)](http://nzbget.net) - learn more about NZBGet;
|
||||
- [Downloads](http://nzbget.net/download) - get compiled binaries and sources;
|
||||
- [Documentation](http://nzbget.net/documentation) - installation manuals, HOW-TOs, API;
|
||||
- [Forum](http://forum.nzbget.net) - get support, share your ideas, scripts, add-ons.
|
||||
NZBGet can run on almost any device - classic PC, NAS, media player, SAT-receiver, WLAN-router, etc.
|
||||
The download area provides precompiled binaries for Windows, macOS, Linux (compatible with
|
||||
many CPUs and platform variants), FreeBSD and Android. For other platforms
|
||||
the program can be compiled from sources.
|
||||
@@ -3,10 +3,6 @@
|
||||
/* Define to 1 to include debug-code */
|
||||
#undef DEBUG
|
||||
|
||||
/* Define to 1 if deleting of files during reading of directory is not
|
||||
properly supported by OS */
|
||||
#undef DIRBROWSER_SNAPSHOT
|
||||
|
||||
/* Define to 1 to not use curses */
|
||||
#undef DISABLE_CURSES
|
||||
|
||||
|
||||
34
configure
vendored
34
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for nzbget 21.0.
|
||||
# Generated by GNU Autoconf 2.69 for nzbget 21.1-testing.
|
||||
#
|
||||
# Report bugs to <hugbug@users.sourceforge.net>.
|
||||
#
|
||||
@@ -580,8 +580,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='nzbget'
|
||||
PACKAGE_TARNAME='nzbget'
|
||||
PACKAGE_VERSION='21.0'
|
||||
PACKAGE_STRING='nzbget 21.0'
|
||||
PACKAGE_VERSION='21.1-testing'
|
||||
PACKAGE_STRING='nzbget 21.1-testing'
|
||||
PACKAGE_BUGREPORT='hugbug@users.sourceforge.net'
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1348,7 +1348,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 21.0 to adapt to many kinds of systems.
|
||||
\`configure' configures nzbget 21.1-testing to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1419,7 +1419,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of nzbget 21.0:";;
|
||||
short | recursive ) echo "Configuration of nzbget 21.1-testing:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1584,7 +1584,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
nzbget configure 21.0
|
||||
nzbget configure 21.1-testing
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2053,7 +2053,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 21.0, which was
|
||||
It was created by nzbget $as_me 21.1-testing, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3026,7 +3026,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='nzbget'
|
||||
VERSION='21.0'
|
||||
VERSION='21.1-testing'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -6611,20 +6611,6 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dir-browser snapshot workaround is needed" >&5
|
||||
$as_echo_n "checking whether dir-browser snapshot workaround is needed... " >&6; }
|
||||
if test "$target_vendor" == "apple"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
$as_echo "#define DIRBROWSER_SNAPSHOT 1" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpu cores via sysconf" >&5
|
||||
$as_echo_n "checking for cpu cores via sysconf... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
@@ -9177,7 +9163,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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 21.0, which was
|
||||
This file was extended by nzbget $as_me 21.1-testing, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -9243,7 +9229,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
nzbget config.status 21.0
|
||||
nzbget config.status 21.1-testing
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
14
configure.ac
14
configure.ac
@@ -21,7 +21,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.65)
|
||||
AC_INIT(nzbget, 21.0, hugbug@users.sourceforge.net)
|
||||
AC_INIT(nzbget, 21.1-testing, hugbug@users.sourceforge.net)
|
||||
AC_CONFIG_AUX_DIR(posix)
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
@@ -222,18 +222,6 @@ AC_TRY_COMPILE([
|
||||
AC_DEFINE_UNQUOTED(SOCKLEN_T, $SOCKLEN_T, [Determine what socket length (socklen_t) data type is])
|
||||
|
||||
|
||||
dnl
|
||||
dnl Dir-browser's snapshot
|
||||
dnl
|
||||
AC_MSG_CHECKING(whether dir-browser snapshot workaround is needed)
|
||||
if test "$target_vendor" == "apple"; then
|
||||
AC_MSG_RESULT([[yes]])
|
||||
AC_DEFINE([DIRBROWSER_SNAPSHOT], 1, [Define to 1 if deleting of files during reading of directory is not properly supported by OS])
|
||||
else
|
||||
AC_MSG_RESULT([[no]])
|
||||
fi
|
||||
|
||||
|
||||
dnl
|
||||
dnl check cpu cores via sysconf
|
||||
dnl
|
||||
|
||||
@@ -172,7 +172,7 @@ void NntpProcessor::Run()
|
||||
}
|
||||
else if (!strncasecmp(line, "GROUP ", 6))
|
||||
{
|
||||
m_connection->WriteLine(CString::FormatStr("211 0 0 0 %s\r\n", line + 7));
|
||||
m_connection->WriteLine(CString::FormatStr("211 0 0 0 %s\r\n", line + 6));
|
||||
}
|
||||
else if (!strncasecmp(line, "AUTHINFO ", 9))
|
||||
{
|
||||
|
||||
@@ -888,7 +888,8 @@ void UnpackController::AddMessage(Message::EKind kind, const char* text)
|
||||
m_unpackDecryptError = true;
|
||||
}
|
||||
|
||||
if (m_unpacker == upUnrar && !strncmp(text, "Unrar: The specified password is incorrect.", 43))
|
||||
if (m_unpacker == upUnrar && (!strncmp(text, "Unrar: The specified password is incorrect.", 43) ||
|
||||
!strncmp(text, "Unrar: Incorrect password for", 29)))
|
||||
{
|
||||
m_unpackPasswordError = true;
|
||||
}
|
||||
|
||||
@@ -117,6 +117,12 @@ void NzbFile::ParseSubject(FileInfo* fileInfo, bool TryQuotes)
|
||||
{
|
||||
// Example subject: some garbage "title" yEnc (10/99)
|
||||
|
||||
if (!fileInfo->GetSubject())
|
||||
{
|
||||
// Malformed file element without subject. We generate subject using internal element id.
|
||||
fileInfo->SetSubject(CString::FormatStr("%d", fileInfo->GetId()));
|
||||
}
|
||||
|
||||
// strip the "yEnc (10/99)"-suffix
|
||||
BString<1024> subject = fileInfo->GetSubject();
|
||||
char* end = subject + strlen(subject) - 1;
|
||||
|
||||
@@ -253,7 +253,6 @@ void QueueCoordinator::Run()
|
||||
// sleep longer in StandBy
|
||||
if (standBy)
|
||||
{
|
||||
Util::SetStandByMode(true);
|
||||
Guard guard(m_waitMutex);
|
||||
// sleeping max. 2 seconds; can't sleep much longer because we can't rely on
|
||||
// notifications from 'WorkState' and we also have periodical work to do here
|
||||
@@ -280,7 +279,7 @@ void QueueCoordinator::Run()
|
||||
g_StatMeter->IntervalCheck();
|
||||
g_Log->IntervalCheck();
|
||||
AdjustDownloadsLimit();
|
||||
Util::SetStandByMode(false);
|
||||
Util::SetStandByMode(standBy);
|
||||
lastReset = Util::CurrentTime();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2238,7 +2238,7 @@ void DownloadXmlCommand::Execute()
|
||||
}
|
||||
}
|
||||
|
||||
if (!strncasecmp(nzbContent, "http://", 6) || !strncasecmp(nzbContent, "https://", 7))
|
||||
if (!strncasecmp(nzbContent, "http://", 7) || !strncasecmp(nzbContent, "https://", 8))
|
||||
{
|
||||
// add url
|
||||
std::unique_ptr<NzbInfo> nzbInfo = std::make_unique<NzbInfo>();
|
||||
@@ -2464,8 +2464,8 @@ void HistoryXmlCommand::Execute()
|
||||
"\"Kind\" : \"%s\",\n"
|
||||
"\"Name\" : \"%s\",\n"
|
||||
"\"HistoryTime\" : %i,\n"
|
||||
"\"FileSizeLo\" : %i,\n"
|
||||
"\"FileSizeHi\" : %i,\n"
|
||||
"\"FileSizeLo\" : %u,\n"
|
||||
"\"FileSizeHi\" : %u,\n"
|
||||
"\"FileSizeMB\" : %i,\n"
|
||||
"\"DupeKey\" : \"%s\",\n"
|
||||
"\"DupeScore\" : %i,\n"
|
||||
@@ -2836,8 +2836,8 @@ void ViewFeedXmlCommand::Execute()
|
||||
"<member><name>Title</name><value><string>%s</string></value></member>\n"
|
||||
"<member><name>Filename</name><value><string>%s</string></value></member>\n"
|
||||
"<member><name>URL</name><value><string>%s</string></value></member>\n"
|
||||
"<member><name>SizeLo</name><value><i4>%i</i4></value></member>\n"
|
||||
"<member><name>SizeHi</name><value><i4>%i</i4></value></member>\n"
|
||||
"<member><name>SizeLo</name><value><i4>%u</i4></value></member>\n"
|
||||
"<member><name>SizeHi</name><value><i4>%u</i4></value></member>\n"
|
||||
"<member><name>SizeMB</name><value><i4>%i</i4></value></member>\n"
|
||||
"<member><name>Category</name><value><string>%s</string></value></member>\n"
|
||||
"<member><name>AddCategory</name><value><string>%s</string></value></member>\n"
|
||||
@@ -2857,8 +2857,8 @@ void ViewFeedXmlCommand::Execute()
|
||||
"\"Title\" : \"%s\",\n"
|
||||
"\"Filename\" : \"%s\",\n"
|
||||
"\"URL\" : \"%s\",\n"
|
||||
"\"SizeLo\" : %i,\n"
|
||||
"\"SizeHi\" : %i,\n"
|
||||
"\"SizeLo\" : %u,\n"
|
||||
"\"SizeHi\" : %u,\n"
|
||||
"\"SizeMB\" : %i,\n"
|
||||
"\"Category\" : \"%s\",\n"
|
||||
"\"AddCategory\" : \"%s\",\n"
|
||||
@@ -3119,11 +3119,11 @@ void ServerVolumesXmlCommand::Execute()
|
||||
"\"ServerID\" : %i,\n"
|
||||
"\"DataTime\" : %i,\n"
|
||||
"\"FirstDay\" : %i,\n"
|
||||
"\"TotalSizeLo\" : %i,\n"
|
||||
"\"TotalSizeHi\" : %i,\n"
|
||||
"\"TotalSizeLo\" : %u,\n"
|
||||
"\"TotalSizeHi\" : %u,\n"
|
||||
"\"TotalSizeMB\" : %i,\n"
|
||||
"\"CustomSizeLo\" : %i,\n"
|
||||
"\"CustomSizeHi\" : %i,\n"
|
||||
"\"CustomSizeLo\" : %u,\n"
|
||||
"\"CustomSizeHi\" : %u,\n"
|
||||
"\"CustomSizeMB\" : %i,\n"
|
||||
"\"CustomTime\" : %i,\n"
|
||||
"\"SecSlot\" : %i,\n"
|
||||
|
||||
@@ -304,10 +304,29 @@ bool FileSystem::AllocateFile(const char* filename, int64 size, bool sparse, CSt
|
||||
errmsg = GetLastErrorMessage();
|
||||
return false;
|
||||
}
|
||||
char c = '0';
|
||||
fwrite(&c, 1, size, file);
|
||||
|
||||
// write zeros in 16K chunks
|
||||
CharBuffer zeros(16 * 1024);
|
||||
memset(zeros, 0, zeros.Size());
|
||||
for (int64 remaining = size; remaining > 0;)
|
||||
{
|
||||
int64 needbytes = std::min(remaining, (int64)zeros.Size());
|
||||
int64 written = fwrite(zeros, 1, needbytes, file);
|
||||
if (written != needbytes)
|
||||
{
|
||||
errmsg = GetLastErrorMessage();
|
||||
fclose(file);
|
||||
return false;
|
||||
}
|
||||
remaining -= written;
|
||||
}
|
||||
fclose(file);
|
||||
|
||||
ok = FileSize(filename) == size;
|
||||
if (!ok)
|
||||
{
|
||||
errmsg = "created file has wrong size";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return ok;
|
||||
@@ -1020,52 +1039,9 @@ CString FileSystem::WidePathToUtfPath(const wchar_t* wpath)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
DirBrowser::DirBrowser(const char* path)
|
||||
{
|
||||
BString<1024> mask("%s%c*.*", path, PATH_SEPARATOR);
|
||||
m_file = FindFirstFileW(FileSystem::UtfPathToWidePath(mask), &m_findData);
|
||||
m_first = true;
|
||||
}
|
||||
|
||||
DirBrowser::~DirBrowser()
|
||||
{
|
||||
if (m_file != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
FindClose(m_file);
|
||||
}
|
||||
}
|
||||
|
||||
const char* DirBrowser::InternNext()
|
||||
{
|
||||
bool ok = false;
|
||||
if (m_first)
|
||||
{
|
||||
ok = m_file != INVALID_HANDLE_VALUE;
|
||||
m_first = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ok = FindNextFileW(m_file, &m_findData) != 0;
|
||||
}
|
||||
if (ok)
|
||||
{
|
||||
m_filename = FileSystem::WidePathToUtfPath(m_findData.cFileName);
|
||||
return m_filename;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#ifdef DIRBROWSER_SNAPSHOT
|
||||
DirBrowser::DirBrowser(const char* path, bool snapshot) :
|
||||
m_snapshot(snapshot)
|
||||
#else
|
||||
DirBrowser::DirBrowser(const char* path)
|
||||
#endif
|
||||
{
|
||||
#ifdef DIRBROWSER_SNAPSHOT
|
||||
if (m_snapshot)
|
||||
{
|
||||
DirBrowser dir(path, false);
|
||||
@@ -1076,35 +1052,57 @@ DirBrowser::DirBrowser(const char* path)
|
||||
m_snapshotIter = m_snapshotFiles.begin();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#ifdef WIN32
|
||||
BString<1024> mask("%s%c*.*", path, PATH_SEPARATOR);
|
||||
m_file = FindFirstFileW(FileSystem::UtfPathToWidePath(mask), &m_findData);
|
||||
m_first = true;
|
||||
#else
|
||||
m_dir = opendir(path);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
DirBrowser::~DirBrowser()
|
||||
{
|
||||
#ifdef DIRBROWSER_SNAPSHOT
|
||||
if (!m_snapshot)
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
if (m_file != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
if (m_dir)
|
||||
{
|
||||
closedir(m_dir);
|
||||
}
|
||||
FindClose(m_file);
|
||||
}
|
||||
#else
|
||||
if (m_dir)
|
||||
{
|
||||
closedir(m_dir);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
const char* DirBrowser::InternNext()
|
||||
{
|
||||
#ifdef DIRBROWSER_SNAPSHOT
|
||||
if (m_snapshot)
|
||||
{
|
||||
return m_snapshotIter == m_snapshotFiles.end() ? nullptr : **m_snapshotIter++;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#ifdef WIN32
|
||||
bool ok = false;
|
||||
if (m_first)
|
||||
{
|
||||
ok = m_file != INVALID_HANDLE_VALUE;
|
||||
m_first = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ok = FindNextFileW(m_file, &m_findData) != 0;
|
||||
}
|
||||
if (ok)
|
||||
{
|
||||
m_filename = FileSystem::WidePathToUtfPath(m_findData.cFileName);
|
||||
return m_filename;
|
||||
}
|
||||
#else
|
||||
if (m_dir)
|
||||
{
|
||||
m_findData = readdir(m_dir);
|
||||
@@ -1113,10 +1111,10 @@ const char* DirBrowser::InternNext()
|
||||
return m_findData->d_name;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
const char* DirBrowser::Next()
|
||||
{
|
||||
|
||||
@@ -84,11 +84,7 @@ public:
|
||||
class DirBrowser
|
||||
{
|
||||
public:
|
||||
#ifdef DIRBROWSER_SNAPSHOT
|
||||
DirBrowser(const char* path, bool snapshot = true);
|
||||
#else
|
||||
DirBrowser(const char* path);
|
||||
#endif
|
||||
~DirBrowser();
|
||||
const char* Next();
|
||||
|
||||
@@ -103,12 +99,10 @@ private:
|
||||
struct dirent* m_findData;
|
||||
#endif
|
||||
|
||||
#ifdef DIRBROWSER_SNAPSHOT
|
||||
bool m_snapshot;
|
||||
typedef std::deque<CString> FileList;
|
||||
FileList m_snapshotFiles;
|
||||
FileList::iterator m_snapshotIter;
|
||||
#endif
|
||||
|
||||
const char* InternNext();
|
||||
};
|
||||
|
||||
@@ -183,7 +183,7 @@ UpdateFromRepository()
|
||||
|
||||
echo "Updating root certificates"
|
||||
cd ../setup
|
||||
curl --remote-name --time-cond cacert.pem https://curl.haxx.se/ca/cacert.pem
|
||||
curl --remote-name --time-cond cacert.pem https://curl.se/ca/cacert.pem
|
||||
cd $BUILDDIR
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -80,7 +80,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;.\lib\yencode;.\windows\resources;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;PACKAGE="nzbget";VERSION="21.0";_DEBUG;_CONSOLE;DEBUG;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;PACKAGE="nzbget";VERSION="21.1-testing";_DEBUG;_CONSOLE;DEBUG;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
@@ -101,7 +101,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;.\lib\yencode;.\windows\resources;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;PACKAGE="nzbget";VERSION="21.0";_DEBUG;_CONSOLE;DEBUG;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;PACKAGE="nzbget";VERSION="21.1-testing";_DEBUG;_CONSOLE;DEBUG;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
@@ -120,7 +120,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;.\lib\yencode;.\windows\resources;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;PACKAGE="nzbget";VERSION="21.0";NDEBUG;_CONSOLE;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;PACKAGE="nzbget";VERSION="21.1-testing";NDEBUG;_CONSOLE;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
@@ -151,7 +151,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<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;.\lib\yencode;.\windows\resources;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;PACKAGE="nzbget";VERSION="21.0";NDEBUG;_CONSOLE;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;PACKAGE="nzbget";VERSION="21.1-testing";NDEBUG;_CONSOLE;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
|
||||
@@ -504,7 +504,6 @@ var Config = (new function($)
|
||||
var $ConfigTabBadgeEmpty;
|
||||
var $ConfigContent;
|
||||
var $ConfigInfo;
|
||||
var $ConfigAbout;
|
||||
var $ConfigTitle;
|
||||
var $ConfigTable;
|
||||
var $ViewButton;
|
||||
@@ -533,7 +532,6 @@ var Config = (new function($)
|
||||
$ConfigTabBadgeEmpty = $('#ConfigTabBadgeEmpty');
|
||||
$ConfigContent = $('#ConfigContent');
|
||||
$ConfigInfo = $('#ConfigInfo');
|
||||
$ConfigAbout = $('#ConfigAbout');
|
||||
$ConfigTitle = $('#ConfigTitle');
|
||||
$ViewButton = $('#Config_ViewButton');
|
||||
$LeaveConfigDialog = $('#LeaveConfigDialog');
|
||||
@@ -1211,10 +1209,9 @@ var Config = (new function($)
|
||||
$('li', $ConfigNav).removeClass('active');
|
||||
link.closest('li').addClass('active');
|
||||
$ConfigContent.removeClass('search');
|
||||
Util.show($ViewButton, sectionId !== 'Config-Info' && sectionId !== 'Config-About');
|
||||
Util.show($ViewButton, sectionId !== 'Config-Info');
|
||||
|
||||
$ConfigInfo.hide();
|
||||
$ConfigAbout.hide();
|
||||
|
||||
if (sectionId === 'Search')
|
||||
{
|
||||
@@ -1228,15 +1225,7 @@ var Config = (new function($)
|
||||
{
|
||||
$ConfigInfo.show();
|
||||
$ConfigData.children().hide();
|
||||
$ConfigTitle.text('INFO: SETTINGS');
|
||||
return;
|
||||
}
|
||||
|
||||
if (sectionId === 'Config-About')
|
||||
{
|
||||
$ConfigAbout.show();
|
||||
$ConfigData.children().hide();
|
||||
$ConfigTitle.text('ABOUT NZBGET');
|
||||
$ConfigTitle.text('INFO');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -683,7 +683,7 @@
|
||||
function itemCheckClick(data, event)
|
||||
{
|
||||
var checkmark = $(event.target).hasClass('check');
|
||||
if (data.dragging || (!checkmark && !data.config.rowSelect))
|
||||
if (data.dragging || (!checkmark && !data.config.rowSelect))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -712,7 +712,7 @@
|
||||
function titleCheckClick(data, event)
|
||||
{
|
||||
var checkmark = $(event.target).hasClass('check');
|
||||
if (data.dragging || (!checkmark && !data.config.rowSelect))
|
||||
if (data.dragging || (!checkmark && !data.config.rowSelect))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -538,7 +538,6 @@
|
||||
<div class="span3">
|
||||
<ul class="nav nav-list" id="ConfigNav">
|
||||
<li class="config-static"><a href="#Config-Info">INFO</a></li>
|
||||
<li class="config-static"><a href="#Config-About">ABOUT NZBGET</a></li>
|
||||
<li class="config-static"><a href="#Config-System">SYSTEM</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -547,7 +546,7 @@
|
||||
<div>
|
||||
|
||||
<div class="config-header clearfix">
|
||||
<div class="pull-left" id="ConfigTitle">INFO: SETTINGS</div>
|
||||
<div class="pull-left" id="ConfigTitle">INFO</div>
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn dropdown-toggle" id="Config_ViewButton" data-toggle="dropdown">View <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu footer-button-menu" id="Config_ViewMenu">
|
||||
@@ -569,12 +568,6 @@
|
||||
When you configure NZBGet for the first time you need
|
||||
to check at least the option <a class="option" href="#" data-category="S" onclick="Config.scrollToOption(event, this)">MainDir</a> and configure one news server.
|
||||
</p>
|
||||
<p>
|
||||
There are many configuration options affecting performance. If you use
|
||||
NZBGet on a computer with limited capabilities, such as NAS, media player,
|
||||
router, etc. you should take your time to configure NZBGet for best
|
||||
performance - see <a href="http://nzbget.net/performance-tips">Performance tips</a>.
|
||||
</p>
|
||||
|
||||
<h4>Extension scripts settings</h4>
|
||||
<p>
|
||||
@@ -595,11 +588,6 @@
|
||||
<p>
|
||||
This can be done in section <em><strong>SYSTEM</strong></em>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="ConfigAbout">
|
||||
<p>For info on NZBGet poject please visit <a href="http://nzbget.net">NZBGet Home Page</a>. Among other things the developers of third-party apps find there complete docs about RPC interface.</p>
|
||||
<p>Should you need help, have suggestions or want to share your improvements - <a href="http://nzbget.net/forum">NZBGet Forum</a> is a place to do that.</p>
|
||||
|
||||
<h4>Copyright</h4>
|
||||
<p>This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@@ -172,13 +172,9 @@ var Upload = (new function($)
|
||||
{
|
||||
var inp = $('#AddDialog_Input');
|
||||
|
||||
// Reset file input control; needed for IE10 but produce problems with opera (the old non-webkit one).
|
||||
if ($.browser.msie)
|
||||
{
|
||||
inp.wrap('<form>').closest('form').get(0).reset();
|
||||
inp.unwrap();
|
||||
}
|
||||
|
||||
// Reset file input control
|
||||
inp.val('');
|
||||
|
||||
inp.click();
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ if errorlevel 1 goto BUILD_FAILED
|
||||
rem Update ca root certificates
|
||||
echo Updating root certificates
|
||||
cd image
|
||||
%CURL% --remote-name --time-cond cacert.pem https://curl.haxx.se/ca/cacert.pem
|
||||
%CURL% --remote-name --time-cond cacert.pem https://curl.se/ca/cacert.pem
|
||||
if errorlevel 1 goto BUILD_FAILED
|
||||
cd ..
|
||||
|
||||
|
||||
Reference in New Issue
Block a user