Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/v4_6_x' into v4_6_x_me
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/base/version.h.in
  • Loading branch information
orionmeetartemis committed Apr 7, 2024
2 parents 494e40c + 535a622 commit bbc58e0
Show file tree
Hide file tree
Showing 122 changed files with 19,516 additions and 19,097 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode/
src/gui/geoip/GeoIP.dat
src/gui/geoip/GeoIP.dat.gz
src/qbittorrent
Expand Down
21 changes: 20 additions & 1 deletion Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
Sun Mar 24th 2024 - sledgehammer999 <[email protected]> - v4.6.4
- BUGFIX: Correctly adjust "Add New torrent" dialog position in all the cases (glassez)
- BUGFIX: Change "metadata received" stop condition behavior (glassez)
- BUGFIX: Add a small delay before processing the key input of search boxes (Chocobo1)
- BUGFIX: Ensure the profile path is pointing to a directory (Chocobo1)
- RSS: Use better icons for RSS articles (glassez)
- WINDOWS: NSIS: Update French, Hungarian translations (MarcDrieu, foxi69)
- LINUX: Fix sorting when ICU isn't used (Chocobo1)
- LINUX: Fix invisible tray icon on Plasma 6 (tehcneko)

Mon Jan 15th 2024 - sledgehammer999 <[email protected]> - v4.6.3
- BUGFIX: Correctly update number of filtered items (glassez)
- BUGFIX: Don't forget to store Stop condition value (glassez)
- BUGFIX: Show correctly decoded filename in log (glassez)
- BUGFIX: Specify a locale if none is set (Chocobo1)
- BUGFIX: Apply inactive seeding time limit set on new torrents (glassez)
- BUGFIX: Show URL seeds for torrents that have no metadata (glassez)
- BUGFIX: Don't get stuck loading on mismatched info-hashes in resume data (glassez)

Mon Nov 27th 2023 - sledgehammer999 <[email protected]> - v4.6.2
- BUGFIX: Do not apply share limit if the previous one was applied (glassez)
- BUGFIX: Show Add new torrent dialog on main window screen (glassez)
Expand All @@ -6,7 +25,7 @@ Mon Nov 27th 2023 - sledgehammer999 <[email protected]> - v4.6.2
- WINDOWS: NSIS: Display correct Minimum Windows OS requirement (xavier2k6)
- WINDOWS: NSIS: Add Hebrew translation (avivmu)
- LINUX: WAYLAND: Fix parent widget of "Lock qBittorrent" submenu (Vlad Zahorodnii)

Mon Nov 20th 2023 - sledgehammer999 <[email protected]> - v4.6.1
- FEATURE: Add option to enable previous Add new torrent dialog behavior (glassez)
- BUGFIX: Prevent crash due to race condition when adding magnet link (glassez)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ Latest AppImage download: [qBittorrent-Enhanced-Edition-x86_64.AppImage](https:/

The one [repository](https://build.opensuse.org/project/show/home:nikoneko:test) contains all 4 variants listed above, links to specific packages are provided for convenience.

#### openSUSE/RPM-based Linux distro (Maintainer: [PhoenixEmik](https://github.com/PhoenixEmik))
#### openSUSE (Maintainer: [openSUSE Chinese Community](https://github.com/openSUSE-zh))

[openSUSE repo](https://build.opensuse.org/package/show/home:PhoenixEmik/qbittorrent-enhanced-edition)
[openSUSE repo](https://build.opensuse.org/package/show/home:opensuse_zh/qBittorrent-Enhanced-Edition)

#### Ubuntu (Maintainer: [poplite](https://github.com/poplite))

Expand Down
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for qbittorrent v4.6.2.
# Generated by GNU Autoconf 2.71 for qbittorrent v4.6.4.
#
# Report bugs to <bugs.qbittorrent.org>.
#
Expand Down Expand Up @@ -611,8 +611,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='qbittorrent'
PACKAGE_TARNAME='qbittorrent'
PACKAGE_VERSION='v4.6.2'
PACKAGE_STRING='qbittorrent v4.6.2'
PACKAGE_VERSION='v4.6.4'
PACKAGE_STRING='qbittorrent v4.6.4'
PACKAGE_BUGREPORT='bugs.qbittorrent.org'
PACKAGE_URL='https://www.qbittorrent.org/'

Expand Down Expand Up @@ -1329,7 +1329,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 qbittorrent v4.6.2 to adapt to many kinds of systems.
\`configure' configures qbittorrent v4.6.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1400,7 +1400,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of qbittorrent v4.6.2:";;
short | recursive ) echo "Configuration of qbittorrent v4.6.4:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1533,7 +1533,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
qbittorrent configure v4.6.2
qbittorrent configure v4.6.4
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1648,7 +1648,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 qbittorrent $as_me v4.6.2, which was
It was created by qbittorrent $as_me v4.6.4, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -4779,7 +4779,7 @@ fi
# Define the identity of the package.
PACKAGE='qbittorrent'
VERSION='v4.6.2'
VERSION='v4.6.4'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
Expand Down Expand Up @@ -7237,7 +7237,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 qbittorrent $as_me v4.6.2, which was
This file was extended by qbittorrent $as_me v4.6.4, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -7297,7 +7297,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
qbittorrent config.status v4.6.2
qbittorrent config.status v4.6.4
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([qbittorrent], [v4.6.2], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
AC_INIT([qbittorrent], [v4.6.4], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
: ${CFLAGS=""}
Expand Down
4 changes: 2 additions & 2 deletions dist/mac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.6.2</string>
<string>4.6.4</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
Expand All @@ -67,7 +67,7 @@
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2006-2023 The qBittorrent project</string>
<string>Copyright © 2006-2024 The qBittorrent project</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
Expand Down
2 changes: 1 addition & 1 deletion dist/unix/org.qbittorrent.qBittorrent.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@
<url type="translate">https://github.com/qbittorrent/qBittorrent/wiki/How-to-translate-qBittorrent</url>
<content_rating type="oars-1.1"/>
<releases>
<release version="4.6.2" date="2023-11-27"/>
<release version="4.6.4" date="2024-03-24"/>
</releases>
</component>
6 changes: 3 additions & 3 deletions dist/unix/org.qbittorrent.qBittorrent.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GenericName[ar]=عميل بت‎تورنت
Comment[ar]=نزّل وشارك الملفات عبر كيوبت‎تورنت
Name[ar]=qBittorrent
GenericName[be]=Кліент BitTorrent
Comment[be]=Спампоўванне і раздача файлаў праз пратакол BitTorrent
Comment[be]=Сьцягваньне й раздача файлаў праз пратакол BitTorrent
Name[be]=qBittorrent
GenericName[bg]=BitTorrent клиент
Comment[bg]=Сваляне и споделяне на файлове чрез BitTorrent
Expand Down Expand Up @@ -144,8 +144,8 @@ GenericName[sl]=BitTorrent odjemalec
Comment[sl]=Prenesite in delite datoteke preko BitTorrenta
Name[sl]=qBittorrent
Name[sq]=qBittorrent
GenericName[sr]=BitTorrent-клијент
Comment[sr]=Преузимајте и делите фајлове преко BitTorrent протокола
GenericName[sr]=BitTorrent клијент
Comment[sr]=Преузимајте и делите фајлове преко BitTorrent
Name[sr]=qBittorrent
GenericName[sr@latin]=BitTorrent klijent
Comment[sr@latin]=Preuzimanje i deljenje fajlova preko BitTorrent-a
Expand Down
4 changes: 2 additions & 2 deletions dist/windows/config.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
; 4.5.1.3 -> good
; 4.5.1.3.2 -> bad
; 4.5.0beta -> bad
!define /ifndef QBT_VERSION "4.6.2.10"
!define /ifndef QBT_VERSION "4.6.4.10"

; Option that controls the installer's window name
; If set, its value will be used like this:
Expand Down Expand Up @@ -112,7 +112,7 @@ OutFile "qbittorrent_enhanced_${QBT_INSTALLER_FILENAME}_setup.exe"
;Installer Version Information
VIAddVersionKey "ProductName" "qBittorrent Enhanced"
VIAddVersionKey "CompanyName" "The qBittorrent Enhanced project"
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2023 The qBittorrent project"
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2024 The qBittorrent project"
VIAddVersionKey "FileDescription" "qBittorrent Enhanced - A Enhanced Bittorrent Client"
VIAddVersionKey "FileVersion" "${QBT_VERSION}"

Expand Down
8 changes: 4 additions & 4 deletions dist/windows/installer-translations/french.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_FRENCH} "qBittorrent (requis)"
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
LangString inst_desktop ${LANG_FRENCH} "Créer un Raccourci sur le Bureau"
LangString inst_desktop ${LANG_FRENCH} "Créer un raccourci sur le Bureau"
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
LangString inst_startmenu ${LANG_FRENCH} "Créer un Raccourci dans le Menu Démarrer"
LangString inst_startmenu ${LANG_FRENCH} "Créer un raccourci dans le Menu Démarrer"
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
LangString inst_startup ${LANG_FRENCH} "Démarrer qBittorrent au démarrage de Windows"
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
Expand Down Expand Up @@ -57,6 +57,6 @@ LangString remove_cache ${LANG_FRENCH} "Supprimer les torrents et données en ca
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
LangString uninst_warning ${LANG_FRENCH} "qBittorrent est en cours d'exécution. Fermez l'application avant de la désinstaller."
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
LangString uninst_tor_warn ${LANG_FRENCH} "Ne peut pas supprimer l'association du .torrent. Elle est associée avec :"
LangString uninst_tor_warn ${LANG_FRENCH} "Impossible de supprimer l'association .torrent. Elle est associée avec :"
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
LangString uninst_mag_warn ${LANG_FRENCH} "Ne peut pas supprimer l'association du magnet. Elle est associée avec :"
LangString uninst_mag_warn ${LANG_FRENCH} "Impossible de supprimer l'association magnet. Elle est associée avec :"
2 changes: 1 addition & 1 deletion dist/windows/installer-translations/hungarian.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LangString inst_requires_64bit ${LANG_HUNGARIAN} "A telepítő csak 64-bites Win
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
LangString inst_requires_win7 ${LANG_HUNGARIAN} "A qBittorrent ezen verziójához minimum Windows 7 szükséges."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_HUNGARIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_HUNGARIAN} "A telepítéshez minimum Windows 10 (1809) / Windows Server 2019 szükséges."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
LangString inst_uninstall_link_description ${LANG_HUNGARIAN} "qBittorrent eltávolítása"

Expand Down
7 changes: 2 additions & 5 deletions src/app/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,8 @@ Application::Application(int &argc, char **argv)
Logger::initInstance();

const auto portableProfilePath = Path(QCoreApplication::applicationDirPath()) / DEFAULT_PORTABLE_MODE_PROFILE_DIR;
const bool portableModeEnabled = m_commandLineArgs.profileDir.isEmpty() && portableProfilePath.exists();

const Path profileDir = portableModeEnabled
? portableProfilePath
: m_commandLineArgs.profileDir;
const bool portableModeEnabled = m_commandLineArgs.profileDir.isEmpty() && Utils::Fs::isDir(portableProfilePath);
const Path profileDir = portableModeEnabled ? portableProfilePath : m_commandLineArgs.profileDir;
Profile::initInstance(profileDir, m_commandLineArgs.configurationName,
(m_commandLineArgs.relativeFastresumePaths || portableModeEnabled));

Expand Down
10 changes: 10 additions & 0 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ void showSplashScreen();

#ifdef Q_OS_UNIX
void adjustFileDescriptorLimit();
void adjustLocale();
#endif

// Main
Expand All @@ -104,6 +105,7 @@ int main(int argc, char *argv[])
#endif

#ifdef Q_OS_UNIX
adjustLocale();
adjustFileDescriptorLimit();
#endif

Expand Down Expand Up @@ -392,4 +394,12 @@ void adjustFileDescriptorLimit()
limit.rlim_cur = limit.rlim_max;
setrlimit(RLIMIT_NOFILE, &limit);
}

void adjustLocale()
{
// specify the default locale just in case if user has not set any other locale
// only `C` locale is available universally without installing locale packages
if (qEnvironmentVariableIsEmpty("LANG"))
qputenv("LANG", "C.UTF-8");
}
#endif
9 changes: 7 additions & 2 deletions src/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,16 @@ add_library(qbt_base STATIC

target_link_libraries(qbt_base
PRIVATE
OpenSSL::Crypto OpenSSL::SSL
OpenSSL::Crypto
OpenSSL::SSL
ZLIB::ZLIB
PUBLIC
LibtorrentRasterbar::torrent-rasterbar
Qt::Core Qt::Network Qt::Sql Qt::Xml
Qt::Core
Qt::CorePrivate
Qt::Network
Qt::Sql
Qt::Xml
qbt_common_cfg
)

Expand Down
10 changes: 10 additions & 0 deletions src/base/bittorrent/bencoderesumedatastorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,16 @@ BitTorrent::LoadResumeDataResult BitTorrent::BencodeResumeDataStorage::loadTorre
return nonstd::make_unexpected(tr("Cannot parse torrent info: %1").arg(QString::fromStdString(ec.message())));

p.ti = torrentInfo;

#ifdef QBT_USES_LIBTORRENT2
if (((p.info_hashes.has_v1() && (p.info_hashes.v1 != p.ti->info_hashes().v1))
|| (p.info_hashes.has_v2() && (p.info_hashes.v2 != p.ti->info_hashes().v2))))
#else
if (!p.info_hash.is_all_zeros() && (p.info_hash != p.ti->info_hash()))
#endif
{
return nonstd::make_unexpected(tr("Mismatching info-hash detected in resume data"));
}
}

p.save_path = Profile::instance()->fromPortablePath(
Expand Down
13 changes: 11 additions & 2 deletions src/base/bittorrent/peer_blacklist.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,17 @@
// bad peer filter
bool is_bad_peer(const lt::peer_info& info)
{
std::regex id_filter("-(XL|SD|XF|QD|BN|DL|TS)(\\d+)-");
std::regex id_filter("-(XL|SD|XF|QD|BN|DL|TS|DT)(\\d+)-");
std::regex ua_filter(R"((\d+.\d+.\d+.\d+|cacao_torrent))");
std::regex consume_filter(R"((dt/torrent|Taipei-torrent))");

// TODO: trafficConsume by thank243(senis) but it's hard to determine GT0003 is legitimate client or not...
// Anyway, block dt/torrent and Taipei-torrent with specific case first.
QString country = Net::GeoIPManager::instance()->lookup(QHostAddress(info.ip.data()));
if (country == QLatin1String("CN") && std::regex_match(info.client, consume_filter)) {
return true;
}

return std::regex_match(info.pid.data(), info.pid.data() + 8, id_filter) || std::regex_match(info.client, ua_filter);
}

Expand Down Expand Up @@ -43,7 +52,7 @@ bool is_offline_downloader(const lt::peer_info& info)
// BitTorrent Media Player Peer filter
bool is_bittorrent_media_player(const lt::peer_info& info)
{
if (info.client.find("StellarPlayer") != std::string::npos) {
if (info.client.find("StellarPlayer") != std::string::npos || info.client.find("Elementum") != std::string::npos) {
return true;
}
std::regex player_filter("-(UW\\w{4}|SP(([0-2]\\d{3})|(3[0-5]\\d{2})))-");
Expand Down
Loading

0 comments on commit bbc58e0

Please sign in to comment.