mirror of
https://github.com/nzbget/nzbget.git
synced 2026-02-02 02:01:19 -05:00
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e26d52d70 | ||
|
|
ae81c9403d | ||
|
|
b0d35f9a09 | ||
|
|
ce7cd631c2 | ||
|
|
0432cf13d3 | ||
|
|
799de88b3e | ||
|
|
7ff3251dcf | ||
|
|
97ae03bbd3 | ||
|
|
6bbfb6b7b7 | ||
|
|
f02bbbefd7 | ||
|
|
4d19c899bd | ||
|
|
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
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
The licenses for most software are designed to take away your
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
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
|
General Public License applies to most of the Free Software
|
||||||
Foundation's software and to any other program whose authors commit to
|
Foundation's software and to any other program whose authors commit to
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
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.
|
your programs, too.
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
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
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow.
|
modification follow.
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
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
|
License. (Exception: if the Program itself is interactive but
|
||||||
does not normally print such an announcement, your work based on
|
does not normally print such an announcement, your work based on
|
||||||
the Program is not required to print an announcement.)
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
These requirements apply to the modified work as a whole. If
|
||||||
identifiable sections of that work are not derived from the Program,
|
identifiable sections of that work are not derived from the Program,
|
||||||
and can be reasonably considered independent and separate works in
|
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
|
access to copy the source code from the same place counts as
|
||||||
distribution of the source code, even though third parties are not
|
distribution of the source code, even though third parties are not
|
||||||
compelled to copy the source along with the object code.
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
except as expressly provided under this License. Any attempt
|
except as expressly provided under this License. Any attempt
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
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
|
This section is intended to make thoroughly clear what is believed to
|
||||||
be a consequence of the rest of this License.
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
original copyright holder who places the Program under this License
|
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 preserving the free status of all derivatives of our free software and
|
||||||
of promoting the sharing and reuse of software generally.
|
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
|
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
|
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
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
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
|
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
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along
|
||||||
along with this program; if not, write to the Free Software
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
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
|
This General Public License does not permit incorporating your program into
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
consider it more useful to permit linking proprietary applications with the
|
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
|
library. If this is what you want to do, use the GNU Lesser General
|
||||||
Public License instead of this License.
|
Public License instead of this License.
|
||||||
33
ChangeLog
33
ChangeLog
@@ -1,3 +1,36 @@
|
|||||||
|
nzbget-21.2-testing:
|
||||||
|
- please see repository change log at
|
||||||
|
https://github.com/nzbget/nzbget/commits/develop
|
||||||
|
|
||||||
|
nzbget-21.1:
|
||||||
|
- fixed crash on systems with 64-bit time;
|
||||||
|
- corrected icon in Windows "uninstall program" list;
|
||||||
|
- allow special characters in URL for username and password;
|
||||||
|
- improved reporting for binding errors on Windows;
|
||||||
|
- fixed unicode space characters in javascript files, which could cause issues
|
||||||
|
with nginx proxy;
|
||||||
|
- fixed negative values for "FileSizeLo" in json-rpc;
|
||||||
|
- corrected url detection in rpc-method "append";
|
||||||
|
- added support for new error messages in unrar 5.80;
|
||||||
|
- now always using snapshots when reading directory contents:
|
||||||
|
- in previous versions snapshots were used on macOS only;
|
||||||
|
- now they are used on all OSes;
|
||||||
|
- this solves issue with leftovers during directory cleanup, which could
|
||||||
|
happen on certain OSes when working with network drives;
|
||||||
|
- fixed file allocating on file systems where sparse files are not supported:
|
||||||
|
- the issue could happen when InterDir was located on a network drive;
|
||||||
|
- fixed crash caused by malformed nzb files;
|
||||||
|
- fixed GROUP command in nserv;
|
||||||
|
- updated url of the global certificate storage file in the build scripts;
|
||||||
|
- fixed: file selector in WebKit based browsers doesn't allow to choose the
|
||||||
|
same file again;
|
||||||
|
- removed outdated links from web interface;
|
||||||
|
- fixed PC sleep mode not working (Windows only);
|
||||||
|
- set "SameSite" attribute for cookies;
|
||||||
|
- corrected typo in about dialog of web interface;
|
||||||
|
- updated license text: changed address of Free Software Foundation and minor
|
||||||
|
formatting changes.
|
||||||
|
|
||||||
nzbget-21.0:
|
nzbget-21.0:
|
||||||
- reworked duplicate handling to support URLs, especially when using RSS
|
- reworked duplicate handling to support URLs, especially when using RSS
|
||||||
feeds:
|
feeds:
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -11,14 +11,9 @@
|
|||||||
NZBGet is a binary downloader, which downloads files from Usenet
|
NZBGet is a binary downloader, which downloads files from Usenet
|
||||||
based on information given in nzb-files.
|
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.
|
NZBGet can run on almost any device - classic PC, NAS, media player, SAT-receiver, WLAN-router, etc.
|
||||||
The download area provides precompiled binaries
|
The download area provides precompiled binaries for Windows, macOS, Linux (compatible with
|
||||||
for Windows, macOS, Linux (compatible with many CPUs and platform variants), FreeBSD and Android. For other platforms
|
many CPUs and platform variants), FreeBSD and Android. For other platforms
|
||||||
the program can be compiled from sources.
|
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.
|
|
||||||
@@ -3,10 +3,6 @@
|
|||||||
/* Define to 1 to include debug-code */
|
/* Define to 1 to include debug-code */
|
||||||
#undef DEBUG
|
#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 */
|
/* Define to 1 to not use curses */
|
||||||
#undef DISABLE_CURSES
|
#undef DISABLE_CURSES
|
||||||
|
|
||||||
|
|||||||
34
configure
vendored
34
configure
vendored
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# 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.2-testing.
|
||||||
#
|
#
|
||||||
# Report bugs to <hugbug@users.sourceforge.net>.
|
# Report bugs to <hugbug@users.sourceforge.net>.
|
||||||
#
|
#
|
||||||
@@ -580,8 +580,8 @@ MAKEFLAGS=
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='nzbget'
|
PACKAGE_NAME='nzbget'
|
||||||
PACKAGE_TARNAME='nzbget'
|
PACKAGE_TARNAME='nzbget'
|
||||||
PACKAGE_VERSION='21.0'
|
PACKAGE_VERSION='21.2-testing'
|
||||||
PACKAGE_STRING='nzbget 21.0'
|
PACKAGE_STRING='nzbget 21.2-testing'
|
||||||
PACKAGE_BUGREPORT='hugbug@users.sourceforge.net'
|
PACKAGE_BUGREPORT='hugbug@users.sourceforge.net'
|
||||||
PACKAGE_URL=''
|
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.
|
# 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.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures nzbget 21.0 to adapt to many kinds of systems.
|
\`configure' configures nzbget 21.2-testing to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
@@ -1419,7 +1419,7 @@ fi
|
|||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of nzbget 21.0:";;
|
short | recursive ) echo "Configuration of nzbget 21.2-testing:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
@@ -1584,7 +1584,7 @@ fi
|
|||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
nzbget configure 21.0
|
nzbget configure 21.2-testing
|
||||||
generated by GNU Autoconf 2.69
|
generated by GNU Autoconf 2.69
|
||||||
|
|
||||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
@@ -2053,7 +2053,7 @@ cat >config.log <<_ACEOF
|
|||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
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.2-testing, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
@@ -3026,7 +3026,7 @@ fi
|
|||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='nzbget'
|
PACKAGE='nzbget'
|
||||||
VERSION='21.0'
|
VERSION='21.2-testing'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
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 "$as_me:${as_lineno-$LINENO}: checking for cpu cores via sysconf" >&5
|
||||||
$as_echo_n "checking for cpu cores via sysconf... " >&6; }
|
$as_echo_n "checking for cpu cores via sysconf... " >&6; }
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
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
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by nzbget $as_me 21.0, which was
|
This file was extended by nzbget $as_me 21.2-testing, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
@@ -9243,7 +9229,7 @@ _ACEOF
|
|||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
nzbget config.status 21.0
|
nzbget config.status 21.2-testing
|
||||||
configured by $0, generated by GNU Autoconf 2.69,
|
configured by $0, generated by GNU Autoconf 2.69,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|||||||
16
configure.ac
16
configure.ac
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of nzbget. See <http://nzbget.net>.
|
# This file is part of nzbget. See <http://nzbget.net>.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008-2019 Andrey Prygunkov <hugbug@users.sourceforge.net>
|
# Copyright (C) 2008-2021 Andrey Prygunkov <hugbug@users.sourceforge.net>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ(2.65)
|
AC_PREREQ(2.65)
|
||||||
AC_INIT(nzbget, 21.0, hugbug@users.sourceforge.net)
|
AC_INIT(nzbget, 21.2-testing, hugbug@users.sourceforge.net)
|
||||||
AC_CONFIG_AUX_DIR(posix)
|
AC_CONFIG_AUX_DIR(posix)
|
||||||
AC_CANONICAL_TARGET
|
AC_CANONICAL_TARGET
|
||||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
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])
|
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
|
||||||
dnl check cpu cores via sysconf
|
dnl check cpu cores via sysconf
|
||||||
dnl
|
dnl
|
||||||
|
|||||||
@@ -209,6 +209,8 @@ bool Connection::Bind()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int errcode = 0;
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
if (m_host && m_host[0] == '/')
|
if (m_host && m_host[0] == '/')
|
||||||
{
|
{
|
||||||
@@ -280,6 +282,7 @@ bool Connection::Bind()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Connection failed
|
// Connection failed
|
||||||
|
errcode = GetLastNetworkError();
|
||||||
closesocket(m_socket);
|
closesocket(m_socket);
|
||||||
m_socket = INVALID_SOCKET;
|
m_socket = INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
@@ -320,6 +323,7 @@ bool Connection::Bind()
|
|||||||
if (res == -1)
|
if (res == -1)
|
||||||
{
|
{
|
||||||
// Connection failed
|
// Connection failed
|
||||||
|
errcode = GetLastNetworkError();
|
||||||
closesocket(m_socket);
|
closesocket(m_socket);
|
||||||
m_socket = INVALID_SOCKET;
|
m_socket = INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
@@ -328,7 +332,7 @@ bool Connection::Bind()
|
|||||||
|
|
||||||
if (m_socket == INVALID_SOCKET)
|
if (m_socket == INVALID_SOCKET)
|
||||||
{
|
{
|
||||||
ReportError("Binding socket failed for %s", m_host, true);
|
ReportError("Binding socket failed for %s", m_host, true, errcode);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -785,18 +789,15 @@ bool Connection::ConnectWithTimeout(void* address, int address_len)
|
|||||||
ret = connect(m_socket, (struct sockaddr*)address, address_len);
|
ret = connect(m_socket, (struct sockaddr*)address, address_len);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
int err = GetLastNetworkError();
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
int err = WSAGetLastError();
|
|
||||||
if (err != WSAEWOULDBLOCK)
|
if (err != WSAEWOULDBLOCK)
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
if (errno != EINPROGRESS)
|
if (err != EINPROGRESS)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//connect succeeded right away?
|
//connect succeeded right away?
|
||||||
@@ -916,7 +917,16 @@ void Connection::Cancel()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Connection::ReportError(const char* msgPrefix, const char* msgArg, bool PrintErrCode, int herrno, const char* herrMsg)
|
int Connection::GetLastNetworkError()
|
||||||
|
{
|
||||||
|
#ifdef WIN32
|
||||||
|
return WSAGetLastError();
|
||||||
|
#else
|
||||||
|
return errno;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void Connection::ReportError(const char* msgPrefix, const char* msgArg, bool printErrCode, int errCode, const char* errMsg)
|
||||||
{
|
{
|
||||||
#ifndef DISABLE_TLS
|
#ifndef DISABLE_TLS
|
||||||
if (m_tlsError)
|
if (m_tlsError)
|
||||||
@@ -929,34 +939,34 @@ void Connection::ReportError(const char* msgPrefix, const char* msgArg, bool Pri
|
|||||||
|
|
||||||
BString<1024> errPrefix(msgPrefix, msgArg);
|
BString<1024> errPrefix(msgPrefix, msgArg);
|
||||||
|
|
||||||
if (PrintErrCode)
|
if (printErrCode)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
BString<1024> printErrMsg;
|
||||||
int ErrCode = WSAGetLastError();
|
if (errCode == 0)
|
||||||
char errMsg[1024];
|
|
||||||
errMsg[0] = '\0';
|
|
||||||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, nullptr, ErrCode, 0, errMsg, 1024, nullptr);
|
|
||||||
errMsg[1024-1] = '\0';
|
|
||||||
#else
|
|
||||||
const char* errMsg = herrMsg;
|
|
||||||
int ErrCode = herrno;
|
|
||||||
if (herrno == 0)
|
|
||||||
{
|
{
|
||||||
ErrCode = errno;
|
errCode = GetLastNetworkError();
|
||||||
errMsg = strerror(ErrCode);
|
|
||||||
}
|
}
|
||||||
else if (!herrMsg)
|
if (errMsg)
|
||||||
{
|
{
|
||||||
errMsg = hstrerror(ErrCode);
|
printErrMsg = errMsg;
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (m_suppressErrors)
|
|
||||||
{
|
|
||||||
debug("%s: ErrNo %i, %s", *errPrefix, ErrCode, errMsg);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PrintError(BString<1024>("%s: ErrNo %i, %s", *errPrefix, ErrCode, errMsg));
|
#ifdef WIN32
|
||||||
|
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, nullptr, errCode, 0, printErrMsg, printErrMsg.Capacity(), nullptr);
|
||||||
|
printErrMsg[1024-1] = '\0';
|
||||||
|
#else
|
||||||
|
printErrMsg = strerror(errCode);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_suppressErrors)
|
||||||
|
{
|
||||||
|
debug("%s: Error %i - %s", *errPrefix, errCode, (const char*)printErrMsg);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PrintError(BString<1024>("%s: Error %i - %s", *errPrefix, errCode, (const char*)printErrMsg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1074,7 +1084,7 @@ in_addr_t Connection::ResolveHostAddr(const char* host)
|
|||||||
#endif
|
#endif
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
ReportError("Could not resolve hostname %s", host, true, h_errnop);
|
ReportError("Could not resolve hostname %s", host, true, h_errnop, hstrerror(h_errnop));
|
||||||
return INADDR_NONE;
|
return INADDR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -136,9 +136,10 @@ protected:
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void ReportError(const char* msgPrefix, const char* msgArg, bool PrintErrCode, int herrno = 0,
|
void ReportError(const char* msgPrefix, const char* msgArg, bool printErrCode, int errCode = 0,
|
||||||
const char* herrMsg = nullptr);
|
const char* errMsg = nullptr);
|
||||||
virtual void PrintError(const char* errMsg);
|
virtual void PrintError(const char* errMsg);
|
||||||
|
int GetLastNetworkError();
|
||||||
bool DoConnect();
|
bool DoConnect();
|
||||||
bool DoDisconnect();
|
bool DoDisconnect();
|
||||||
bool InitSocketOpts(SOCKET socket);
|
bool InitSocketOpts(SOCKET socket);
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ void NntpProcessor::Run()
|
|||||||
}
|
}
|
||||||
else if (!strncasecmp(line, "GROUP ", 6))
|
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))
|
else if (!strncasecmp(line, "AUTHINFO ", 9))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -888,7 +888,8 @@ void UnpackController::AddMessage(Message::EKind kind, const char* text)
|
|||||||
m_unpackDecryptError = true;
|
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;
|
m_unpackPasswordError = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,6 +117,12 @@ void NzbFile::ParseSubject(FileInfo* fileInfo, bool TryQuotes)
|
|||||||
{
|
{
|
||||||
// Example subject: some garbage "title" yEnc (10/99)
|
// 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
|
// strip the "yEnc (10/99)"-suffix
|
||||||
BString<1024> subject = fileInfo->GetSubject();
|
BString<1024> subject = fileInfo->GetSubject();
|
||||||
char* end = subject + strlen(subject) - 1;
|
char* end = subject + strlen(subject) - 1;
|
||||||
|
|||||||
@@ -253,7 +253,6 @@ void QueueCoordinator::Run()
|
|||||||
// sleep longer in StandBy
|
// sleep longer in StandBy
|
||||||
if (standBy)
|
if (standBy)
|
||||||
{
|
{
|
||||||
Util::SetStandByMode(true);
|
|
||||||
Guard guard(m_waitMutex);
|
Guard guard(m_waitMutex);
|
||||||
// sleeping max. 2 seconds; can't sleep much longer because we can't rely on
|
// 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
|
// notifications from 'WorkState' and we also have periodical work to do here
|
||||||
@@ -280,7 +279,7 @@ void QueueCoordinator::Run()
|
|||||||
g_StatMeter->IntervalCheck();
|
g_StatMeter->IntervalCheck();
|
||||||
g_Log->IntervalCheck();
|
g_Log->IntervalCheck();
|
||||||
AdjustDownloadsLimit();
|
AdjustDownloadsLimit();
|
||||||
Util::SetStandByMode(false);
|
Util::SetStandByMode(standBy);
|
||||||
lastReset = Util::CurrentTime();
|
lastReset = Util::CurrentTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -222,18 +222,11 @@ void WebProcessor::ParseUrl()
|
|||||||
if (pauth1 && pauth1 < pauth2)
|
if (pauth1 && pauth1 < pauth2)
|
||||||
{
|
{
|
||||||
char* pstart = m_url + 1;
|
char* pstart = m_url + 1;
|
||||||
int len = 0;
|
char* pend = pauth2;
|
||||||
char* pend = strchr(pstart + 1, '/');
|
int len = std::min((int)(pend - pstart), (int)sizeof(m_authInfo) - 1);
|
||||||
if (pend)
|
|
||||||
{
|
|
||||||
len = (int)(pend - pstart < (int)sizeof(m_authInfo) - 1 ? pend - pstart : (int)sizeof(m_authInfo) - 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
len = strlen(pstart);
|
|
||||||
}
|
|
||||||
strncpy(m_authInfo, pstart, len);
|
strncpy(m_authInfo, pstart, len);
|
||||||
m_authInfo[len] = '\0';
|
m_authInfo[len] = '\0';
|
||||||
|
WebUtil::UrlDecode(m_authInfo);
|
||||||
m_url = CString(pend);
|
m_url = CString(pend);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -466,8 +459,8 @@ void WebProcessor::SendBodyResponse(const char* body, int bodyLen, const char* c
|
|||||||
"Access-Control-Allow-Credentials: true\r\n"
|
"Access-Control-Allow-Credentials: true\r\n"
|
||||||
"Access-Control-Max-Age: 86400\r\n"
|
"Access-Control-Max-Age: 86400\r\n"
|
||||||
"Access-Control-Allow-Headers: Content-Type, Authorization\r\n"
|
"Access-Control-Allow-Headers: Content-Type, Authorization\r\n"
|
||||||
"Set-Cookie: Auth-Type=%s\r\n"
|
"Set-Cookie: Auth-Type=%s; SameSite=Lax\r\n"
|
||||||
"Set-Cookie: Auth-Token=%s; HttpOnly\r\n"
|
"Set-Cookie: Auth-Token=%s; HttpOnly; SameSite=Lax\r\n"
|
||||||
"Content-Length: %i\r\n"
|
"Content-Length: %i\r\n"
|
||||||
"%s" // Content-Type: xxx
|
"%s" // Content-Type: xxx
|
||||||
"%s" // Content-Encoding: gzip
|
"%s" // Content-Encoding: gzip
|
||||||
|
|||||||
@@ -1443,7 +1443,7 @@ void LogXmlCommand::Execute()
|
|||||||
|
|
||||||
AppendCondResponse(",\n", IsJson() && index++ > 0);
|
AppendCondResponse(",\n", IsJson() && index++ > 0);
|
||||||
AppendFmtResponse(IsJson() ? JSON_LOG_ITEM : XML_LOG_ITEM,
|
AppendFmtResponse(IsJson() ? JSON_LOG_ITEM : XML_LOG_ITEM,
|
||||||
message.GetId(), messageType[message.GetKind()], message.GetTime(),
|
message.GetId(), messageType[message.GetKind()], (int)message.GetTime(),
|
||||||
*EncodeStr(message.GetText()));
|
*EncodeStr(message.GetText()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1550,7 +1550,7 @@ void ListFilesXmlCommand::Execute()
|
|||||||
AppendCondResponse(",\n", IsJson() && index++ > 0);
|
AppendCondResponse(",\n", IsJson() && index++ > 0);
|
||||||
AppendFmtResponse(IsJson() ? JSON_LIST_ITEM : XML_LIST_ITEM,
|
AppendFmtResponse(IsJson() ? JSON_LIST_ITEM : XML_LIST_ITEM,
|
||||||
fileInfo->GetId(), fileSizeLo, fileSizeHi, remainingSizeLo, remainingSizeHi,
|
fileInfo->GetId(), fileSizeLo, fileSizeHi, remainingSizeLo, remainingSizeHi,
|
||||||
fileInfo->GetTime(), BoolToStr(fileInfo->GetFilenameConfirmed()),
|
(int)fileInfo->GetTime(), BoolToStr(fileInfo->GetFilenameConfirmed()),
|
||||||
BoolToStr(fileInfo->GetPaused()), fileInfo->GetNzbInfo()->GetId(),
|
BoolToStr(fileInfo->GetPaused()), fileInfo->GetNzbInfo()->GetId(),
|
||||||
*xmlNzbNicename, *xmlNzbNicename, *EncodeStr(fileInfo->GetNzbInfo()->GetFilename()),
|
*xmlNzbNicename, *xmlNzbNicename, *EncodeStr(fileInfo->GetNzbInfo()->GetFilename()),
|
||||||
*EncodeStr(fileInfo->GetSubject()), *EncodeStr(fileInfo->GetFilename()),
|
*EncodeStr(fileInfo->GetSubject()), *EncodeStr(fileInfo->GetFilename()),
|
||||||
@@ -1748,14 +1748,14 @@ void NzbInfoXmlCommand::AppendNzbInfoFields(NzbInfo* nzbInfo)
|
|||||||
deleteStatusName[nzbInfo->GetDeleteStatus()], markStatusName[nzbInfo->GetMarkStatus()],
|
deleteStatusName[nzbInfo->GetDeleteStatus()], markStatusName[nzbInfo->GetMarkStatus()],
|
||||||
urlStatusName[nzbInfo->GetUrlStatus()],
|
urlStatusName[nzbInfo->GetUrlStatus()],
|
||||||
fileSizeLo, fileSizeHi, fileSizeMB, nzbInfo->GetFileCount(),
|
fileSizeLo, fileSizeHi, fileSizeMB, nzbInfo->GetFileCount(),
|
||||||
nzbInfo->GetMinTime(), nzbInfo->GetMaxTime(),
|
(int)nzbInfo->GetMinTime(), (int)nzbInfo->GetMaxTime(),
|
||||||
nzbInfo->GetTotalArticles(), nzbInfo->GetCurrentSuccessArticles(), nzbInfo->GetCurrentFailedArticles(),
|
nzbInfo->GetTotalArticles(), nzbInfo->GetCurrentSuccessArticles(), nzbInfo->GetCurrentFailedArticles(),
|
||||||
nzbInfo->CalcHealth(), nzbInfo->CalcCriticalHealth(false),
|
nzbInfo->CalcHealth(), nzbInfo->CalcCriticalHealth(false),
|
||||||
*EncodeStr(nzbInfo->GetDupeKey()), nzbInfo->GetDupeScore(), dupeModeName[nzbInfo->GetDupeMode()],
|
*EncodeStr(nzbInfo->GetDupeKey()), nzbInfo->GetDupeScore(), dupeModeName[nzbInfo->GetDupeMode()],
|
||||||
BoolToStr(nzbInfo->GetDeleteStatus() != NzbInfo::dsNone),
|
BoolToStr(nzbInfo->GetDeleteStatus() != NzbInfo::dsNone),
|
||||||
downloadedSizeLo, downloadedSizeHi, downloadedSizeMB, nzbInfo->GetDownloadSec(),
|
downloadedSizeLo, downloadedSizeHi, downloadedSizeMB, nzbInfo->GetDownloadSec(),
|
||||||
nzbInfo->GetPostTotalSec() + (nzbInfo->GetPostInfo() && nzbInfo->GetPostInfo()->GetStartTime() ?
|
(int)(nzbInfo->GetPostTotalSec() + (nzbInfo->GetPostInfo() && nzbInfo->GetPostInfo()->GetStartTime() ?
|
||||||
Util::CurrentTime() - nzbInfo->GetPostInfo()->GetStartTime() : 0),
|
Util::CurrentTime() - nzbInfo->GetPostInfo()->GetStartTime() : 0)),
|
||||||
nzbInfo->GetParSec(), nzbInfo->GetRepairSec(), nzbInfo->GetUnpackSec(), messageCount, nzbInfo->GetExtraParBlocks());
|
nzbInfo->GetParSec(), nzbInfo->GetRepairSec(), nzbInfo->GetUnpackSec(), messageCount, nzbInfo->GetExtraParBlocks());
|
||||||
|
|
||||||
// Post-processing parameters
|
// Post-processing parameters
|
||||||
@@ -1856,8 +1856,8 @@ void NzbInfoXmlCommand::AppendPostInfoFields(PostInfo* postInfo, int logEntries,
|
|||||||
|
|
||||||
AppendFmtResponse(itemStart, *EncodeStr(postInfo->GetProgressLabel()),
|
AppendFmtResponse(itemStart, *EncodeStr(postInfo->GetProgressLabel()),
|
||||||
postInfo->GetStageProgress(),
|
postInfo->GetStageProgress(),
|
||||||
postInfo->GetStageTime() ? curTime - postInfo->GetStageTime() : 0,
|
(int)(postInfo->GetStageTime() ? curTime - postInfo->GetStageTime() : 0),
|
||||||
postInfo->GetStartTime() ? curTime - postInfo->GetStartTime() : 0);
|
(int)(postInfo->GetStartTime() ? curTime - postInfo->GetStartTime() : 0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1884,7 +1884,7 @@ void NzbInfoXmlCommand::AppendPostInfoFields(PostInfo* postInfo, int logEntries,
|
|||||||
|
|
||||||
AppendCondResponse(",\n", IsJson() && index++ > 0);
|
AppendCondResponse(",\n", IsJson() && index++ > 0);
|
||||||
AppendFmtResponse(IsJson() ? JSON_LOG_ITEM : XML_LOG_ITEM,
|
AppendFmtResponse(IsJson() ? JSON_LOG_ITEM : XML_LOG_ITEM,
|
||||||
message.GetId(), messageType[message.GetKind()], message.GetTime(),
|
message.GetId(), messageType[message.GetKind()], (int)message.GetTime(),
|
||||||
*EncodeStr(message.GetText()));
|
*EncodeStr(message.GetText()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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
|
// add url
|
||||||
std::unique_ptr<NzbInfo> nzbInfo = std::make_unique<NzbInfo>();
|
std::unique_ptr<NzbInfo> nzbInfo = std::make_unique<NzbInfo>();
|
||||||
@@ -2464,8 +2464,8 @@ void HistoryXmlCommand::Execute()
|
|||||||
"\"Kind\" : \"%s\",\n"
|
"\"Kind\" : \"%s\",\n"
|
||||||
"\"Name\" : \"%s\",\n"
|
"\"Name\" : \"%s\",\n"
|
||||||
"\"HistoryTime\" : %i,\n"
|
"\"HistoryTime\" : %i,\n"
|
||||||
"\"FileSizeLo\" : %i,\n"
|
"\"FileSizeLo\" : %u,\n"
|
||||||
"\"FileSizeHi\" : %i,\n"
|
"\"FileSizeHi\" : %u,\n"
|
||||||
"\"FileSizeMB\" : %i,\n"
|
"\"FileSizeMB\" : %i,\n"
|
||||||
"\"DupeKey\" : \"%s\",\n"
|
"\"DupeKey\" : \"%s\",\n"
|
||||||
"\"DupeScore\" : %i,\n"
|
"\"DupeScore\" : %i,\n"
|
||||||
@@ -2502,7 +2502,7 @@ void HistoryXmlCommand::Execute()
|
|||||||
|
|
||||||
AppendFmtResponse(IsJson() ? JSON_HISTORY_ITEM_START : XML_HISTORY_ITEM_START,
|
AppendFmtResponse(IsJson() ? JSON_HISTORY_ITEM_START : XML_HISTORY_ITEM_START,
|
||||||
historyInfo->GetId(), *EncodeStr(historyInfo->GetName()), nzbInfo->GetParkedFileCount(),
|
historyInfo->GetId(), *EncodeStr(historyInfo->GetName()), nzbInfo->GetParkedFileCount(),
|
||||||
BoolToStr(nzbInfo->GetCompletedFiles()->size()), historyInfo->GetTime(), status);
|
BoolToStr(nzbInfo->GetCompletedFiles()->size()), (int)historyInfo->GetTime(), status);
|
||||||
}
|
}
|
||||||
else if (historyInfo->GetKind() == HistoryInfo::hkDup)
|
else if (historyInfo->GetKind() == HistoryInfo::hkDup)
|
||||||
{
|
{
|
||||||
@@ -2514,7 +2514,7 @@ void HistoryXmlCommand::Execute()
|
|||||||
|
|
||||||
AppendFmtResponse(IsJson() ? JSON_HISTORY_DUP_ITEM : XML_HISTORY_DUP_ITEM,
|
AppendFmtResponse(IsJson() ? JSON_HISTORY_DUP_ITEM : XML_HISTORY_DUP_ITEM,
|
||||||
historyInfo->GetId(), historyInfo->GetId(), "DUP", *EncodeStr(historyInfo->GetName()),
|
historyInfo->GetId(), historyInfo->GetId(), "DUP", *EncodeStr(historyInfo->GetName()),
|
||||||
historyInfo->GetTime(), fileSizeLo, fileSizeHi, fileSizeMB,
|
(int)historyInfo->GetTime(), fileSizeLo, fileSizeHi, fileSizeMB,
|
||||||
*EncodeStr(dupInfo->GetDupeKey()), dupInfo->GetDupeScore(),
|
*EncodeStr(dupInfo->GetDupeKey()), dupInfo->GetDupeScore(),
|
||||||
dupeModeName[dupInfo->GetDupeMode()], dupStatusName[dupInfo->GetStatus()],
|
dupeModeName[dupInfo->GetDupeMode()], dupStatusName[dupInfo->GetStatus()],
|
||||||
status);
|
status);
|
||||||
@@ -2836,8 +2836,8 @@ void ViewFeedXmlCommand::Execute()
|
|||||||
"<member><name>Title</name><value><string>%s</string></value></member>\n"
|
"<member><name>Title</name><value><string>%s</string></value></member>\n"
|
||||||
"<member><name>Filename</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>URL</name><value><string>%s</string></value></member>\n"
|
||||||
"<member><name>SizeLo</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>%i</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>SizeMB</name><value><i4>%i</i4></value></member>\n"
|
||||||
"<member><name>Category</name><value><string>%s</string></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"
|
"<member><name>AddCategory</name><value><string>%s</string></value></member>\n"
|
||||||
@@ -2857,8 +2857,8 @@ void ViewFeedXmlCommand::Execute()
|
|||||||
"\"Title\" : \"%s\",\n"
|
"\"Title\" : \"%s\",\n"
|
||||||
"\"Filename\" : \"%s\",\n"
|
"\"Filename\" : \"%s\",\n"
|
||||||
"\"URL\" : \"%s\",\n"
|
"\"URL\" : \"%s\",\n"
|
||||||
"\"SizeLo\" : %i,\n"
|
"\"SizeLo\" : %u,\n"
|
||||||
"\"SizeHi\" : %i,\n"
|
"\"SizeHi\" : %u,\n"
|
||||||
"\"SizeMB\" : %i,\n"
|
"\"SizeMB\" : %i,\n"
|
||||||
"\"Category\" : \"%s\",\n"
|
"\"Category\" : \"%s\",\n"
|
||||||
"\"AddCategory\" : \"%s\",\n"
|
"\"AddCategory\" : \"%s\",\n"
|
||||||
@@ -2893,7 +2893,7 @@ void ViewFeedXmlCommand::Execute()
|
|||||||
*EncodeStr(feedItemInfo.GetTitle()), *EncodeStr(feedItemInfo.GetFilename()),
|
*EncodeStr(feedItemInfo.GetTitle()), *EncodeStr(feedItemInfo.GetFilename()),
|
||||||
*EncodeStr(feedItemInfo.GetUrl()), sizeLo, sizeHi, sizeMB,
|
*EncodeStr(feedItemInfo.GetUrl()), sizeLo, sizeHi, sizeMB,
|
||||||
*EncodeStr(feedItemInfo.GetCategory()), *EncodeStr(feedItemInfo.GetAddCategory()),
|
*EncodeStr(feedItemInfo.GetCategory()), *EncodeStr(feedItemInfo.GetAddCategory()),
|
||||||
BoolToStr(feedItemInfo.GetPauseNzb()), feedItemInfo.GetPriority(), feedItemInfo.GetTime(),
|
BoolToStr(feedItemInfo.GetPauseNzb()), feedItemInfo.GetPriority(), (int)feedItemInfo.GetTime(),
|
||||||
matchStatusType[feedItemInfo.GetMatchStatus()], feedItemInfo.GetMatchRule(),
|
matchStatusType[feedItemInfo.GetMatchStatus()], feedItemInfo.GetMatchRule(),
|
||||||
*EncodeStr(feedItemInfo.GetDupeKey()), feedItemInfo.GetDupeScore(),
|
*EncodeStr(feedItemInfo.GetDupeKey()), feedItemInfo.GetDupeScore(),
|
||||||
dupeModeType[feedItemInfo.GetDupeMode()], statusType[feedItemInfo.GetStatus()]);
|
dupeModeType[feedItemInfo.GetDupeMode()], statusType[feedItemInfo.GetStatus()]);
|
||||||
@@ -3119,11 +3119,11 @@ void ServerVolumesXmlCommand::Execute()
|
|||||||
"\"ServerID\" : %i,\n"
|
"\"ServerID\" : %i,\n"
|
||||||
"\"DataTime\" : %i,\n"
|
"\"DataTime\" : %i,\n"
|
||||||
"\"FirstDay\" : %i,\n"
|
"\"FirstDay\" : %i,\n"
|
||||||
"\"TotalSizeLo\" : %i,\n"
|
"\"TotalSizeLo\" : %u,\n"
|
||||||
"\"TotalSizeHi\" : %i,\n"
|
"\"TotalSizeHi\" : %u,\n"
|
||||||
"\"TotalSizeMB\" : %i,\n"
|
"\"TotalSizeMB\" : %i,\n"
|
||||||
"\"CustomSizeLo\" : %i,\n"
|
"\"CustomSizeLo\" : %u,\n"
|
||||||
"\"CustomSizeHi\" : %i,\n"
|
"\"CustomSizeHi\" : %u,\n"
|
||||||
"\"CustomSizeMB\" : %i,\n"
|
"\"CustomSizeMB\" : %i,\n"
|
||||||
"\"CustomTime\" : %i,\n"
|
"\"CustomTime\" : %i,\n"
|
||||||
"\"SecSlot\" : %i,\n"
|
"\"SecSlot\" : %i,\n"
|
||||||
|
|||||||
@@ -304,10 +304,29 @@ bool FileSystem::AllocateFile(const char* filename, int64 size, bool sparse, CSt
|
|||||||
errmsg = GetLastErrorMessage();
|
errmsg = GetLastErrorMessage();
|
||||||
return false;
|
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);
|
fclose(file);
|
||||||
|
|
||||||
ok = FileSize(filename) == size;
|
ok = FileSize(filename) == size;
|
||||||
|
if (!ok)
|
||||||
|
{
|
||||||
|
errmsg = "created file has wrong size";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return ok;
|
return ok;
|
||||||
@@ -1020,52 +1039,9 @@ CString FileSystem::WidePathToUtfPath(const wchar_t* wpath)
|
|||||||
#endif
|
#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) :
|
DirBrowser::DirBrowser(const char* path, bool snapshot) :
|
||||||
m_snapshot(snapshot)
|
m_snapshot(snapshot)
|
||||||
#else
|
|
||||||
DirBrowser::DirBrowser(const char* path)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
#ifdef DIRBROWSER_SNAPSHOT
|
|
||||||
if (m_snapshot)
|
if (m_snapshot)
|
||||||
{
|
{
|
||||||
DirBrowser dir(path, false);
|
DirBrowser dir(path, false);
|
||||||
@@ -1076,35 +1052,57 @@ DirBrowser::DirBrowser(const char* path)
|
|||||||
m_snapshotIter = m_snapshotFiles.begin();
|
m_snapshotIter = m_snapshotFiles.begin();
|
||||||
}
|
}
|
||||||
else
|
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);
|
m_dir = opendir(path);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DirBrowser::~DirBrowser()
|
DirBrowser::~DirBrowser()
|
||||||
{
|
{
|
||||||
#ifdef DIRBROWSER_SNAPSHOT
|
#ifdef WIN32
|
||||||
if (!m_snapshot)
|
if (m_file != INVALID_HANDLE_VALUE)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (m_dir)
|
FindClose(m_file);
|
||||||
{
|
|
||||||
closedir(m_dir);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
if (m_dir)
|
||||||
|
{
|
||||||
|
closedir(m_dir);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* DirBrowser::InternNext()
|
const char* DirBrowser::InternNext()
|
||||||
{
|
{
|
||||||
#ifdef DIRBROWSER_SNAPSHOT
|
|
||||||
if (m_snapshot)
|
if (m_snapshot)
|
||||||
{
|
{
|
||||||
return m_snapshotIter == m_snapshotFiles.end() ? nullptr : **m_snapshotIter++;
|
return m_snapshotIter == m_snapshotFiles.end() ? nullptr : **m_snapshotIter++;
|
||||||
}
|
}
|
||||||
else
|
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)
|
if (m_dir)
|
||||||
{
|
{
|
||||||
m_findData = readdir(m_dir);
|
m_findData = readdir(m_dir);
|
||||||
@@ -1113,10 +1111,10 @@ const char* DirBrowser::InternNext()
|
|||||||
return m_findData->d_name;
|
return m_findData->d_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
const char* DirBrowser::Next()
|
const char* DirBrowser::Next()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -84,18 +84,14 @@ public:
|
|||||||
class DirBrowser
|
class DirBrowser
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#ifdef DIRBROWSER_SNAPSHOT
|
|
||||||
DirBrowser(const char* path, bool snapshot = true);
|
DirBrowser(const char* path, bool snapshot = true);
|
||||||
#else
|
|
||||||
DirBrowser(const char* path);
|
|
||||||
#endif
|
|
||||||
~DirBrowser();
|
~DirBrowser();
|
||||||
const char* Next();
|
const char* Next();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
WIN32_FIND_DATAW m_findData;
|
WIN32_FIND_DATAW m_findData;
|
||||||
HANDLE m_file;
|
HANDLE m_file = INVALID_HANDLE_VALUE;
|
||||||
bool m_first;
|
bool m_first;
|
||||||
CString m_filename;
|
CString m_filename;
|
||||||
#else
|
#else
|
||||||
@@ -103,12 +99,10 @@ private:
|
|||||||
struct dirent* m_findData;
|
struct dirent* m_findData;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DIRBROWSER_SNAPSHOT
|
|
||||||
bool m_snapshot;
|
bool m_snapshot;
|
||||||
typedef std::deque<CString> FileList;
|
typedef std::deque<CString> FileList;
|
||||||
FileList m_snapshotFiles;
|
FileList m_snapshotFiles;
|
||||||
FileList::iterator m_snapshotIter;
|
FileList::iterator m_snapshotIter;
|
||||||
#endif
|
|
||||||
|
|
||||||
const char* InternNext();
|
const char* InternNext();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -183,7 +183,9 @@ UpdateFromRepository()
|
|||||||
|
|
||||||
echo "Updating root certificates"
|
echo "Updating root certificates"
|
||||||
cd ../setup
|
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
|
||||||
|
# remove expired DST Root CA X3 certificate
|
||||||
|
sed '/^DST Root CA X3$/,/^-----END CERTIFICATE-----$/d;' -i cacert.pem
|
||||||
cd $BUILDDIR
|
cd $BUILDDIR
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<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>
|
<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.2-testing";_DEBUG;_CONSOLE;DEBUG;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<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>
|
<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.2-testing";_DEBUG;_CONSOLE;DEBUG;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<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>
|
<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.2-testing";NDEBUG;_CONSOLE;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<ClCompile>
|
<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>
|
<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.2-testing";NDEBUG;_CONSOLE;_WIN32_WINNT=0x0403;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ExceptionHandling>Sync</ExceptionHandling>
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
|||||||
@@ -24,8 +24,6 @@
|
|||||||
<string>10.7</string>
|
<string>10.7</string>
|
||||||
<key>LSUIElement</key>
|
<key>LSUIElement</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSHumanReadableCopyright</key>
|
|
||||||
<string>Copyright © 2007-2019 Andrey Prygunkov</string>
|
|
||||||
<key>NSMainNibFile</key>
|
<key>NSMainNibFile</key>
|
||||||
<string>MainApp</string>
|
<string>MainApp</string>
|
||||||
<key>NSAppTransportSecurity</key>
|
<key>NSAppTransportSecurity</key>
|
||||||
|
|||||||
@@ -504,7 +504,6 @@ var Config = (new function($)
|
|||||||
var $ConfigTabBadgeEmpty;
|
var $ConfigTabBadgeEmpty;
|
||||||
var $ConfigContent;
|
var $ConfigContent;
|
||||||
var $ConfigInfo;
|
var $ConfigInfo;
|
||||||
var $ConfigAbout;
|
|
||||||
var $ConfigTitle;
|
var $ConfigTitle;
|
||||||
var $ConfigTable;
|
var $ConfigTable;
|
||||||
var $ViewButton;
|
var $ViewButton;
|
||||||
@@ -533,7 +532,6 @@ var Config = (new function($)
|
|||||||
$ConfigTabBadgeEmpty = $('#ConfigTabBadgeEmpty');
|
$ConfigTabBadgeEmpty = $('#ConfigTabBadgeEmpty');
|
||||||
$ConfigContent = $('#ConfigContent');
|
$ConfigContent = $('#ConfigContent');
|
||||||
$ConfigInfo = $('#ConfigInfo');
|
$ConfigInfo = $('#ConfigInfo');
|
||||||
$ConfigAbout = $('#ConfigAbout');
|
|
||||||
$ConfigTitle = $('#ConfigTitle');
|
$ConfigTitle = $('#ConfigTitle');
|
||||||
$ViewButton = $('#Config_ViewButton');
|
$ViewButton = $('#Config_ViewButton');
|
||||||
$LeaveConfigDialog = $('#LeaveConfigDialog');
|
$LeaveConfigDialog = $('#LeaveConfigDialog');
|
||||||
@@ -1211,10 +1209,9 @@ var Config = (new function($)
|
|||||||
$('li', $ConfigNav).removeClass('active');
|
$('li', $ConfigNav).removeClass('active');
|
||||||
link.closest('li').addClass('active');
|
link.closest('li').addClass('active');
|
||||||
$ConfigContent.removeClass('search');
|
$ConfigContent.removeClass('search');
|
||||||
Util.show($ViewButton, sectionId !== 'Config-Info' && sectionId !== 'Config-About');
|
Util.show($ViewButton, sectionId !== 'Config-Info');
|
||||||
|
|
||||||
$ConfigInfo.hide();
|
$ConfigInfo.hide();
|
||||||
$ConfigAbout.hide();
|
|
||||||
|
|
||||||
if (sectionId === 'Search')
|
if (sectionId === 'Search')
|
||||||
{
|
{
|
||||||
@@ -1228,15 +1225,7 @@ var Config = (new function($)
|
|||||||
{
|
{
|
||||||
$ConfigInfo.show();
|
$ConfigInfo.show();
|
||||||
$ConfigData.children().hide();
|
$ConfigData.children().hide();
|
||||||
$ConfigTitle.text('INFO: SETTINGS');
|
$ConfigTitle.text('INFO');
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sectionId === 'Config-About')
|
|
||||||
{
|
|
||||||
$ConfigAbout.show();
|
|
||||||
$ConfigData.children().hide();
|
|
||||||
$ConfigTitle.text('ABOUT NZBGET');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -683,7 +683,7 @@
|
|||||||
function itemCheckClick(data, event)
|
function itemCheckClick(data, event)
|
||||||
{
|
{
|
||||||
var checkmark = $(event.target).hasClass('check');
|
var checkmark = $(event.target).hasClass('check');
|
||||||
if (data.dragging || (!checkmark && !data.config.rowSelect))
|
if (data.dragging || (!checkmark && !data.config.rowSelect))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -712,7 +712,7 @@
|
|||||||
function titleCheckClick(data, event)
|
function titleCheckClick(data, event)
|
||||||
{
|
{
|
||||||
var checkmark = $(event.target).hasClass('check');
|
var checkmark = $(event.target).hasClass('check');
|
||||||
if (data.dragging || (!checkmark && !data.config.rowSelect))
|
if (data.dragging || (!checkmark && !data.config.rowSelect))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -538,7 +538,6 @@
|
|||||||
<div class="span3">
|
<div class="span3">
|
||||||
<ul class="nav nav-list" id="ConfigNav">
|
<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-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>
|
<li class="config-static"><a href="#Config-System">SYSTEM</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -547,7 +546,7 @@
|
|||||||
<div>
|
<div>
|
||||||
|
|
||||||
<div class="config-header clearfix">
|
<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">
|
<div class="btn-group pull-right">
|
||||||
<a class="btn dropdown-toggle" id="Config_ViewButton" data-toggle="dropdown">View <span class="caret"></span></a>
|
<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">
|
<ul class="dropdown-menu footer-button-menu" id="Config_ViewMenu">
|
||||||
@@ -569,12 +568,6 @@
|
|||||||
When you configure NZBGet for the first time you need
|
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.
|
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>
|
||||||
<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>
|
<h4>Extension scripts settings</h4>
|
||||||
<p>
|
<p>
|
||||||
@@ -595,11 +588,6 @@
|
|||||||
<p>
|
<p>
|
||||||
This can be done in section <em><strong>SYSTEM</strong></em>.
|
This can be done in section <em><strong>SYSTEM</strong></em>.
|
||||||
</p>
|
</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>
|
<h4>Copyright</h4>
|
||||||
<p>This program is free software; you can redistribute it and/or modify
|
<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');
|
var inp = $('#AddDialog_Input');
|
||||||
|
|
||||||
// Reset file input control; needed for IE10 but produce problems with opera (the old non-webkit one).
|
// Reset file input control
|
||||||
if ($.browser.msie)
|
inp.val('');
|
||||||
{
|
|
||||||
inp.wrap('<form>').closest('form').get(0).reset();
|
|
||||||
inp.unwrap();
|
|
||||||
}
|
|
||||||
|
|
||||||
inp.click();
|
inp.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,8 +93,10 @@ if errorlevel 1 goto BUILD_FAILED
|
|||||||
rem Update ca root certificates
|
rem Update ca root certificates
|
||||||
echo Updating root certificates
|
echo Updating root certificates
|
||||||
cd image
|
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
|
if errorlevel 1 goto BUILD_FAILED
|
||||||
|
rem remove expired DST Root CA X3 certificate
|
||||||
|
%SED% -e "/^DST Root CA X3$/,/^-----END CERTIFICATE-----$/d;" -i cacert.pem
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
cd tmp\nzbget-%VERSION%
|
cd tmp\nzbget-%VERSION%
|
||||||
|
|||||||
@@ -176,8 +176,9 @@ CreateShortCut "$SMPROGRAMS\NZBGet\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
|||||||
; Add control panel entry for Uninstall
|
; Add control panel entry for Uninstall
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NZBGet" "DisplayName" "NZBGet"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NZBGet" "DisplayName" "NZBGet"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NZBGet" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NZBGet" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NZBGet" "Publisher" "Andrey Prygunkov"
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NZBGet" "InstallLocation" "$INSTDIR"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NZBGet" "InstallLocation" "$INSTDIR"
|
||||||
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NZBGet" "Publisher" "nzbget.net"
|
||||||
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NZBGet" "DisplayIcon" "$\"$INSTDIR\nzbget.exe$\",0"
|
||||||
|
|
||||||
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
|
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
|
||||||
IntFmt $0 "0x%08X" $0
|
IntFmt $0 "0x%08X" $0
|
||||||
|
|||||||
@@ -15,17 +15,15 @@
|
|||||||
// Neutral resources
|
// Neutral resources
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
#pragma code_page(1252)
|
#pragma code_page(1252)
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Menu
|
// Menu
|
||||||
//
|
//
|
||||||
|
|
||||||
IDR_TRAYMENU MENU
|
IDR_TRAYMENU MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "Menu"
|
POPUP "Menu"
|
||||||
BEGIN
|
BEGIN
|
||||||
@@ -81,20 +79,19 @@ IDI_TRAYICON_WORKING ICON "trayicon_working.ico"
|
|||||||
// Dialog
|
// Dialog
|
||||||
//
|
//
|
||||||
|
|
||||||
IDD_ABOUTBOX DIALOGEX 0, 0, 176, 194
|
IDD_ABOUTBOX DIALOGEX 0, 0, 177, 182
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "About NZBGet"
|
CAPTION "About NZBGet"
|
||||||
FONT 8, "Tahoma", 400, 0, 0x0
|
FONT 8, "Tahoma", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,63,173,50,14
|
DEFPUSHBUTTON "OK",IDOK,63,161,50,14
|
||||||
CTEXT "Version 15.0-testing-r1200",IDC_ABOUT_VERSION,16,70,144,8
|
CTEXT "Version 15.0-testing-r1200",IDC_ABOUT_VERSION,16,70,145,8
|
||||||
CTEXT "Lightweight usenet downloader",IDC_STATIC,16,83,144,8
|
CTEXT "Lightweight usenet downloader",IDC_STATIC,16,83,145,8
|
||||||
CTEXT "http://nzbget.net",IDC_ABOUT_HOMEPAGE,55,144,64,9,SS_NOTIFY
|
CTEXT "http://nzbget.net",IDC_ABOUT_HOMEPAGE,55,144,64,9,SS_NOTIFY
|
||||||
CTEXT "Copyright <20> 2007-2019 Andrey Prygunkov",IDC_STATIC,16,156,144,8
|
|
||||||
ICON "",IDC_ABOUT_ICON,67,7,21,20
|
ICON "",IDC_ABOUT_ICON,67,7,21,20
|
||||||
CTEXT "NZBGet",IDC_ABOUT_NAME,16,51,144,16
|
CTEXT "NZBGet",IDC_ABOUT_NAME,16,51,145,16
|
||||||
CTEXT "The package includes other software; see program's folder for licenses.",IDC_STATIC,16,121,144,20
|
CTEXT "The package includes other software; see program's folder for licenses.",IDC_STATIC,16,121,145,20
|
||||||
CTEXT "NZBGet is free software; use it under the terms of the ",IDC_STATIC,16,99,144,20
|
CTEXT "NZBGet is free software; use it under the terms of the ",IDC_STATIC,16,99,145,20
|
||||||
CTEXT "GNU General Public License",IDC_ABOUT_GPL,62,107,90,8,SS_NOTIFY
|
CTEXT "GNU General Public License",IDC_ABOUT_GPL,62,107,90,8,SS_NOTIFY
|
||||||
LTEXT ".",IDC_STATIC,151,107,8,8,SS_NOTIFY
|
LTEXT ".",IDC_STATIC,151,107,8,8,SS_NOTIFY
|
||||||
END
|
END
|
||||||
@@ -153,14 +150,14 @@ END
|
|||||||
//
|
//
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
GUIDELINES DESIGNINFO
|
GUIDELINES DESIGNINFO
|
||||||
BEGIN
|
BEGIN
|
||||||
IDD_ABOUTBOX, DIALOG
|
IDD_ABOUTBOX, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 16
|
LEFTMARGIN, 16
|
||||||
RIGHTMARGIN, 160
|
RIGHTMARGIN, 161
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 187
|
BOTTOMMARGIN, 175
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_PREFDIALOG, DIALOG
|
IDD_PREFDIALOG, DIALOG
|
||||||
@@ -183,6 +180,17 @@ BEGIN
|
|||||||
END
|
END
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// AFX_DIALOG_LAYOUT
|
||||||
|
//
|
||||||
|
|
||||||
|
IDD_ABOUTBOX AFX_DIALOG_LAYOUT
|
||||||
|
BEGIN
|
||||||
|
0
|
||||||
|
END
|
||||||
|
|
||||||
#endif // Neutral resources
|
#endif // Neutral resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@@ -191,10 +199,8 @@ END
|
|||||||
// German (Germany) resources
|
// German (Germany) resources
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||||
#pragma code_page(1252)
|
#pragma code_page(1252)
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user