mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 16:58:06 -06:00
Compare commits
141 Commits
release-4.
...
release-4.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
063844ed44 | ||
|
|
899f8a3f61 | ||
|
|
0f72f22096 | ||
|
|
ffda0ab0ac | ||
|
|
21f18623db | ||
|
|
c4265db0fd | ||
|
|
bc8d9656f6 | ||
|
|
bd284facbd | ||
|
|
7eb77cbcbd | ||
|
|
86e96b819e | ||
|
|
132be7ee9d | ||
|
|
9f8a6e8fb1 | ||
|
|
e6447c8f28 | ||
|
|
7dd9e73431 | ||
|
|
ea82962c5d | ||
|
|
b2a43eeffc | ||
|
|
681347148d | ||
|
|
1f63490755 | ||
|
|
0140ed356f | ||
|
|
2c8f322af5 | ||
|
|
6f31ebd899 | ||
|
|
014df529c5 | ||
|
|
482dad00fd | ||
|
|
7898037006 | ||
|
|
5c819ee384 | ||
|
|
a590e7139b | ||
|
|
89a8e07217 | ||
|
|
5c05bdaa27 | ||
|
|
7006afc611 | ||
|
|
9cb3a6d29e | ||
|
|
2b6baa6099 | ||
|
|
8881035b7a | ||
|
|
2be30a50ef | ||
|
|
81a7b0c034 | ||
|
|
e7235cc3f8 | ||
|
|
1570b51f6c | ||
|
|
6272c6d95d | ||
|
|
473ae25fd8 | ||
|
|
42d7d9b5f4 | ||
|
|
0f77b00428 | ||
|
|
060804d3b8 | ||
|
|
f8b6cb4879 | ||
|
|
a6d27223db | ||
|
|
bb32b88a62 | ||
|
|
332b173e08 | ||
|
|
e921cf677a | ||
|
|
973b5a4809 | ||
|
|
688e11a911 | ||
|
|
f7e6b96493 | ||
|
|
88bf6f11c7 | ||
|
|
90e2236990 | ||
|
|
6ad7cadc4b | ||
|
|
0499111156 | ||
|
|
ae44e59c9a | ||
|
|
1de52f9bcf | ||
|
|
448e55031e | ||
|
|
3b748178c2 | ||
|
|
a4a54ce712 | ||
|
|
d19b524d2d | ||
|
|
1e2bf50e66 | ||
|
|
e7f3409053 | ||
|
|
9758633eeb | ||
|
|
3def5e40c4 | ||
|
|
ca923ed02c | ||
|
|
e4c3bad93a | ||
|
|
3b52c5ce97 | ||
|
|
44b94803a4 | ||
|
|
5d4644c4fc | ||
|
|
a2ef115c66 | ||
|
|
1356f200b8 | ||
|
|
3c68896b1d | ||
|
|
265da50791 | ||
|
|
4037143f4e | ||
|
|
8cae8ad5c5 | ||
|
|
50bd845682 | ||
|
|
ed5aa07526 | ||
|
|
437b51b3a5 | ||
|
|
c2ccc9dfa4 | ||
|
|
b2c7d8211f | ||
|
|
726455ac3e | ||
|
|
ae2bb4efeb | ||
|
|
9971329121 | ||
|
|
d0ec1c4a86 | ||
|
|
9c55600d81 | ||
|
|
b45fb74e01 | ||
|
|
f16c585a77 | ||
|
|
9c664d04ae | ||
|
|
3d0ca83474 | ||
|
|
e713ffb064 | ||
|
|
cf1e61bcf5 | ||
|
|
42b22d6645 | ||
|
|
2d607f8c1a | ||
|
|
69256905c2 | ||
|
|
305316b1fc | ||
|
|
27e222455b | ||
|
|
2b18318e0c | ||
|
|
49cadce253 | ||
|
|
f1b908b95b | ||
|
|
4acfcef8da | ||
|
|
69f2196a22 | ||
|
|
b20a3c5b8e | ||
|
|
2c5271b3b2 | ||
|
|
7696895a88 | ||
|
|
c1ae5d2572 | ||
|
|
0e635c7fdd | ||
|
|
58345e5bbf | ||
|
|
89382d4ec2 | ||
|
|
372f5af36b | ||
|
|
f38736729d | ||
|
|
bf67ef21c6 | ||
|
|
cfd40adcb5 | ||
|
|
8210f9841e | ||
|
|
ae3d17ec01 | ||
|
|
349e958be3 | ||
|
|
42acc75394 | ||
|
|
8b91dcedb0 | ||
|
|
a454a0303d | ||
|
|
789c6de2e8 | ||
|
|
c2fb51159f | ||
|
|
bfb0afe3cf | ||
|
|
26a2d4f24d | ||
|
|
f6e88c8c55 | ||
|
|
51033c212a | ||
|
|
16c858cf61 | ||
|
|
0496543fce | ||
|
|
746e8a7be1 | ||
|
|
6d301ccf55 | ||
|
|
d441b18da0 | ||
|
|
13023ba70a | ||
|
|
ecb7c02d4c | ||
|
|
fd1ac43157 | ||
|
|
c6d4a1f7d4 | ||
|
|
01110690da | ||
|
|
c998c7d38d | ||
|
|
230f98da4a | ||
|
|
c86db0004f | ||
|
|
e645514c8f | ||
|
|
f3c9dbd512 | ||
|
|
ef650293e3 | ||
|
|
05e217537c | ||
|
|
13cb3b5ca1 |
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
custom: "https://www.qbittorrent.org/donate.php"
|
||||
32
.github/workflows/ci.yaml
vendored
32
.github/workflows/ci.yaml
vendored
@@ -4,20 +4,13 @@ name: GitHub Actions CI
|
||||
# Cache is not used for Ubuntu builds, because it already has all dependencies except
|
||||
# the appropriate libtorrent version, which only takes 3-5 minutes to build from source anyway
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
types: [edited, opened, reopened, synchronize]
|
||||
branches: [ master ]
|
||||
on: [pull_request, push]
|
||||
|
||||
env:
|
||||
# Qt: 5.15.1
|
||||
# libtorrent: RC_1_2 HEAD, 1.2.11
|
||||
VCPKG_COMMIT: 133051b793486ef14e67e9d1f48c9cfe64dc127e
|
||||
VCPKG_COMMIT: e4ce66eecfd3e5cca5eac06c971921bf8e37cf88
|
||||
VCPKG_DEST_MACOS: /Users/runner/qbt_tools/vcpkg
|
||||
VCPKG_DEST_WIN: C:\qbt_tools\vcpkg
|
||||
LIBTORRENT_VERSION_TAG: v1.2.11
|
||||
LIBTORRENT_VERSION_TAG: v1.2.12
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -26,7 +19,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-20.04, ubuntu-18.04]
|
||||
os: [ubuntu-20.04]
|
||||
qbt_gui: ["GUI=ON", "GUI=OFF"]
|
||||
fail-fast: false
|
||||
|
||||
@@ -125,10 +118,15 @@ jobs:
|
||||
"qt5-svg:x64-windows-static-release",
|
||||
"qt5-tools:x64-windows-static-release",
|
||||
"qt5-winextras:x64-windows-static-release"
|
||||
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe upgrade `
|
||||
--overlay-triplets=${{ github.workspace }}/triplets_overlay `
|
||||
--overlay-ports=${{ github.workspace }}/vcpkg `
|
||||
--no-dry-run
|
||||
foreach($package in $packages)
|
||||
{
|
||||
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe install $package `
|
||||
--overlay-triplets=${{ github.workspace }}/triplets_overlay `
|
||||
--overlay-ports=${{ github.workspace }}/vcpkg `
|
||||
--clean-after-build
|
||||
}
|
||||
|
||||
@@ -199,13 +197,6 @@ jobs:
|
||||
Add-Content ${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake `
|
||||
-Value "set(VCPKG_BUILD_TYPE release)","set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15)"
|
||||
|
||||
# NOTE: Avoids a libtorrent ABI issue. See https://github.com/arvidn/libtorrent/issues/4965
|
||||
- name: force AppleClang to compile libtorrent with C++17
|
||||
run: |
|
||||
(Get-Content -path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake).Replace( `
|
||||
'${FEATURE_OPTIONS}', '${FEATURE_OPTIONS} -DCMAKE_CXX_STANDARD=17') `
|
||||
| Set-Content -Path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake
|
||||
|
||||
- name: install dependencies via vcpkg
|
||||
run: |
|
||||
$packages = `
|
||||
@@ -215,10 +206,15 @@ jobs:
|
||||
"qt5-svg:x64-osx-release",
|
||||
"qt5-tools:x64-osx-release",
|
||||
"qt5-macextras:x64-osx-release"
|
||||
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg upgrade `
|
||||
--overlay-triplets=${{ github.workspace }}/triplets_overlay `
|
||||
--overlay-ports=${{ github.workspace }}/vcpkg `
|
||||
--no-dry-run
|
||||
foreach($package in $packages)
|
||||
{
|
||||
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg install $package `
|
||||
--overlay-triplets=${{ github.workspace }}/triplets_overlay `
|
||||
--overlay-ports=${{ github.workspace }}/vcpkg `
|
||||
--clean-after-build
|
||||
}
|
||||
|
||||
|
||||
7
.github/workflows/file_health.yaml
vendored
7
.github/workflows/file_health.yaml
vendored
@@ -1,11 +1,6 @@
|
||||
name: GitHub Actions file health check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ '**' ]
|
||||
pull_request:
|
||||
types: [edited, opened, reopened, synchronize]
|
||||
branches: [ '**' ]
|
||||
on: [pull_request, push]
|
||||
|
||||
jobs:
|
||||
check_file_health:
|
||||
|
||||
31
.github/workflows/webui_ci.yaml
vendored
Normal file
31
.github/workflows/webui_ci.yaml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: WebUI CI
|
||||
|
||||
on: [pull_request, push]
|
||||
|
||||
jobs:
|
||||
check_webui:
|
||||
name: Check WebUI
|
||||
runs-on: ubuntu-20.04
|
||||
defaults:
|
||||
run:
|
||||
working-directory: src/webui/www
|
||||
|
||||
steps:
|
||||
- name: checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: setup nodejs
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
- name: install tools
|
||||
run: npm install
|
||||
|
||||
- name: lint code
|
||||
run: npm run lint
|
||||
|
||||
- name: format code
|
||||
run: |
|
||||
npm run format
|
||||
git diff --exit-code
|
||||
10
.travis.yml
10
.travis.yml
@@ -106,8 +106,8 @@ install:
|
||||
|
||||
brew update > /dev/null
|
||||
brew upgrade cmake
|
||||
brew install ccache colormake boost openssl qt zlib
|
||||
brew link --force qt zlib
|
||||
brew install ccache colormake boost openssl qt@5 zlib
|
||||
brew link --force qt@5 zlib
|
||||
|
||||
if [ "$build_system" = "cmake" ]; then
|
||||
sudo ln -s /usr/local/opt/qt/mkspecs /usr/local/mkspecs
|
||||
@@ -125,7 +125,7 @@ install:
|
||||
pushd "$HOME"
|
||||
git clone --single-branch --branch RC_1_2 https://github.com/arvidn/libtorrent.git
|
||||
cd libtorrent
|
||||
git checkout tags/v1.2.11
|
||||
git checkout tags/v1.2.12
|
||||
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
@@ -140,13 +140,13 @@ install:
|
||||
pushd "$HOME"
|
||||
git clone --single-branch --branch RC_2_0 https://github.com/arvidn/libtorrent.git
|
||||
cd libtorrent
|
||||
git checkout tags/v2.0.1
|
||||
git checkout tags/v2.0.2
|
||||
git submodule update --init --recursive
|
||||
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_STANDARD=17 \
|
||||
-Ddeprecated-functions=ON \
|
||||
-Ddeprecated-functions=OFF \
|
||||
-DOPENSSL_ROOT_DIR="$openssl_root_path" \
|
||||
./
|
||||
make
|
||||
|
||||
18
AUTHORS
18
AUTHORS
@@ -17,19 +17,23 @@ Contributors:
|
||||
* Nick Tiskov <daymansmail@gmail.com>
|
||||
|
||||
Code from other projects:
|
||||
* files src/qtsingleapplication/* src/lineedit/*
|
||||
* files src/app/qtlocalpeer/*
|
||||
copyright: Nokia Corporation
|
||||
license: LGPL
|
||||
license: mixed
|
||||
|
||||
* files src/ico.cpp src/ico.h
|
||||
copyright: Malte Starostik <malte@kde.org>
|
||||
license: LGPL
|
||||
* files src/gui/lineedit.*
|
||||
copyright: Trolltech ASA <info@trolltech.com>
|
||||
license: custom
|
||||
|
||||
* files src/search_engine/socks.py
|
||||
copyright: Dan Haim <negativeiq@users.sourceforge.net>
|
||||
license: BSD
|
||||
|
||||
* file src/stacktrace_win.h
|
||||
* file src/app/stacktrace.h
|
||||
copyright: Timo Bingmann from http://idlebox.net/
|
||||
license: WTFPL v2.0
|
||||
|
||||
* file src/app/stacktrace_win.h
|
||||
copyright: Quassel Project
|
||||
license: GPLv2/3
|
||||
|
||||
@@ -119,7 +123,7 @@ Translations authors:
|
||||
- German: Niels Hoffmann (zentralmaschine@users.sourceforge.net)
|
||||
- Greek: Tsvetan Bankov (emerge_life@users.sourceforge.net), Stephanos Antaris (santaris@csd.auth.gr), sledgehammer999(hammered999@gmail.com) and Γιάννης Ανθυμίδης Evropi(Transifex)
|
||||
- Hebrew: David Deutsch (d.deffo@gmail.com)
|
||||
- Hungarian: Majoros Péter (majoros.j.p@t-online.hu)
|
||||
- Hungarian: Majoros Péter
|
||||
- Italian: bovirus (bovirus@live.it) and Matteo Sechi (bu17714@gmail.com)
|
||||
- Japanese: Masato Hashimoto (cabezon.hashimoto@gmail.com)
|
||||
- Korean: Jin Woo Sin (jin828sin@users.sourceforge.net)
|
||||
|
||||
@@ -12,9 +12,9 @@ project(qBittorrent
|
||||
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
|
||||
# version requirements - older vesions may work, but you are on your own
|
||||
set(minBoostVersion 1.65)
|
||||
set(minQtVersion 5.9.5)
|
||||
set(minQtVersion 5.11)
|
||||
set(minOpenSSLVersion 1.1.1)
|
||||
set(minLibtorrentVersion 1.2.11)
|
||||
set(minLibtorrentVersion 1.2.12)
|
||||
set(minZlibVersion 1.2.11)
|
||||
|
||||
# features (some are platform-specific)
|
||||
@@ -61,5 +61,4 @@ else()
|
||||
endif()
|
||||
|
||||
# Generate version header
|
||||
file(READ "src/base/version.h.in" versionHeader)
|
||||
file(WRITE "src/base/version.h" "${versionHeader}")
|
||||
configure_file("src/base/version.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/src/base/version.h" @ONLY)
|
||||
|
||||
7
COPYING
7
COPYING
@@ -1,5 +1,6 @@
|
||||
qBittorrent is licensed under the GNU General Public License version 2 with the
|
||||
addition of the following special exception:
|
||||
qBittorrent is licensed under the GNU General Public License either version 2,
|
||||
or (at your option) any later version with the addition of the following
|
||||
special exception:
|
||||
|
||||
In addition, as a special exception, the copyright holders give permission to
|
||||
link this program with the OpenSSL project's "OpenSSL" library (or with
|
||||
@@ -10,6 +11,8 @@ modify file(s), you may extend this exception to your version of the file(s),
|
||||
but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version.
|
||||
|
||||
See also the AUTHORS file
|
||||
|
||||
----------
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
66
Changelog
66
Changelog
@@ -1,3 +1,69 @@
|
||||
Sun May 02 2021 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.3.5
|
||||
- BUGFIX: Move cursor to the end when autofilling URL/hash in "Download from URLs" dialog (Chocobo1)
|
||||
- BUGFIX: Sort invalid QDateTime values after valid values (Chocobo1)
|
||||
- BUGFIX: Fix tabChangesFocus attribute in "Edit trackers" dialog (Christoph Rackwitz)
|
||||
- BUGFIX: Update DynDNS register url (zhuangzi926)
|
||||
- BUGFIX: Handle "not enough disk space" error more graciously (glassez)
|
||||
- BUGFIX: Correctly draw progress background with stylesheet (jagannatharjun)
|
||||
- WEBUI: Fix magnet url from the search facility (Chocobo1)
|
||||
- WEBUI: Revise folder monitoring functions (Chocobo1)
|
||||
- WEBUI: Fix magnet url from the browser (brvphoenix)
|
||||
- WEBUI: Allow to specify file indexes in torrents/files API (glassez)
|
||||
- WINDOWS: NSIS: Allow more strings to translated (bovirus, Chocobo1)
|
||||
- WINDOWS: NSIS: Update Italian, German, Estonian, Russian, PortugueseBR translations (bovirus, Henry Water, PriitUring, Долматов Алексей, Felipe)
|
||||
- LINUX: Fix D-Bus Notification `desktop-entry` field (Chocobo1)
|
||||
- MACOS: Don't use executable name as CFBundleName value (Nick Korotysh)
|
||||
- OTHER: Lower Qt requirement to 5.11 (sledgehammer999)
|
||||
- OTHER: Clarify that the license is GPLv2+ (sledgehammer999)
|
||||
|
||||
Wed Mar 24 2021 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.3.4.1
|
||||
- BUGFIX: Correctly draw progress bar (glassez)
|
||||
- WEBUI: Fix javascript code which broke the UI (Chocobo1)
|
||||
|
||||
Tue Mar 23 2021 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.3.4
|
||||
- FEATURE: Add ability to prioritize selected items by shown file order (Chocobo1)
|
||||
- FEATURE: Allow tab to escape the text box in "Edit trackers" dialog (Christoph Rackwitz)
|
||||
- FEATURE: Support sub-sorting in Transferlist (jagannatharjun)
|
||||
- FEATURE: Expose ToS setting from libtorrent (Chocobo1)
|
||||
- FEATURE: Improve tracker entries handling (glassez)
|
||||
- BUGFIX: Drop extension from generated content folder name (glassez)
|
||||
- BUGFIX: Change qBittorrent Updater window title (xavier2k6)
|
||||
- BUGFIX: Validate HTTPS Tracker Certificate by default (an0n666)
|
||||
- BUGFIX: Don't let "program update" dialog steal focus (Chocobo1)
|
||||
- BUGFIX: Disable expand on double click in TorrentContentTreeView (jagannatharjun)
|
||||
- BUGFIX: Add hyperlink to Transifex on translator list (Si Yong Kim)
|
||||
- BUGFIX: Enlarge "speed limit" icon slightly (Chocobo1)
|
||||
- BUGFIX: Don't prevent system sleep due to errored torrents (dyumin)
|
||||
- BUGFIX: Use stable sorting in transfer list (Chocobo1)
|
||||
- BUGFIX: Allow "missing files" torrents to save more resume data (glassez)
|
||||
- BUGFIX: Restart "missing files" torrents after changing location (glassez)
|
||||
- BUGFIX: Show proper string when torrent availability is not available (Chocobo1)
|
||||
- BUGFIX: Apply "Hide zero/infinity values" to "Time Active", "Down/Up Limit" and ETA columns (Chocobo1)
|
||||
- BUGFIX: Fix potential out-of-bounds access (Chocobo1)
|
||||
- BUGFIX: Make SpeedPlotView averager time aware (jagannatharjun)
|
||||
- BUGFIX: Add a 3-Hour graph (jagannatharjun)
|
||||
- BUGFIX: Add an option to disable icons in menus (always disabled on MacOS) (Michał Kopeć)
|
||||
- BUGFIX: Improve detection of filename extension of audio/video files (Chocobo1)
|
||||
- BUGFIX: Various drawing improvements of progress bar (Chocobo1)
|
||||
- BUGFIX: Properly stop torrent creation if aborted (Chocobo1)
|
||||
- BUGFIX: Replace external program parameters in one step (Chocobo1)
|
||||
- BUGFIX: Improve "save resume data" handling (glassez)
|
||||
- BUGFIX: Fix bad IPv6 address format for outgoingInterfaces (treysis)
|
||||
- WEBUI: Properly decode strings (brvphoenix)
|
||||
- WEBUI: Accept "share limits" when adding torrent using WebAPI (glassez)
|
||||
- WEBUI: Add seeding time to the active time column (thalieht)
|
||||
- WEBUI: Fix incorrect seeding time string in General tab (thalieht)
|
||||
- WEBUI: Allow >100 days in WebUI function "friendlyDuration" (thalieht)
|
||||
- WEBUI: Avoid decoding strings repeatedly (brvphoenix)
|
||||
- RSS: Add category button on AutomatedRSSDownloader on GUI (Si Yong Kim)
|
||||
- WINDOWS: NSIS: Update Czech translation (slrslr)
|
||||
- WINDOWS: NSIS: Update Portuguese BR translation (Alex)
|
||||
- WINDOWS: NSIS: Add Estonian translation (PriitUring)
|
||||
- WINDOWS: Allow change-case-only file renaming (glassez)
|
||||
- LINUX: Systemd: wait for mounting of local filesystems (Juraj Oršulić)
|
||||
- OTHER: Raise minimum libtorrent version to 1.2.12 (glassez)
|
||||
- OTHER: Raise minimum Qt version to 5.12 (glassez)
|
||||
|
||||
Tue Jan 19 2021 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.3.3
|
||||
- FEATURE: New languages: Azerbaijani, Estonian
|
||||
- BUGFIX: Unify global speed dialogs for normal/alternative speeds (thalieht)
|
||||
|
||||
4
INSTALL
4
INSTALL
@@ -5,13 +5,13 @@ qBittorrent - A BitTorrent client in C++ / Qt
|
||||
|
||||
- Boost >= 1.65
|
||||
|
||||
- libtorrent-rasterbar >= 1.2.11 (by Arvid Norberg)
|
||||
- libtorrent-rasterbar >= 1.2.12 (by Arvid Norberg)
|
||||
* https://www.libtorrent.org/
|
||||
* Be careful: another library (the one used by rTorrent) uses a similar name
|
||||
|
||||
- OpenSSL >= 1.1.1
|
||||
|
||||
- Qt >= 5.9.5
|
||||
- Qt >= 5.12
|
||||
|
||||
- zlib >= 1.2.11
|
||||
|
||||
|
||||
80
configure
vendored
80
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.70 for qbittorrent v4.3.3.
|
||||
# Generated by GNU Autoconf 2.70 for qbittorrent v4.3.5.
|
||||
#
|
||||
# Report bugs to <bugs.qbittorrent.org>.
|
||||
#
|
||||
@@ -610,8 +610,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='qbittorrent'
|
||||
PACKAGE_TARNAME='qbittorrent'
|
||||
PACKAGE_VERSION='v4.3.3'
|
||||
PACKAGE_STRING='qbittorrent v4.3.3'
|
||||
PACKAGE_VERSION='v4.3.5'
|
||||
PACKAGE_STRING='qbittorrent v4.3.5'
|
||||
PACKAGE_BUGREPORT='bugs.qbittorrent.org'
|
||||
PACKAGE_URL='https://www.qbittorrent.org/'
|
||||
|
||||
@@ -1330,7 +1330,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.3.3 to adapt to many kinds of systems.
|
||||
\`configure' configures qbittorrent v4.3.5 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1401,7 +1401,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of qbittorrent v4.3.3:";;
|
||||
short | recursive ) echo "Configuration of qbittorrent v4.3.5:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1455,7 +1455,7 @@ Some influential environment variables:
|
||||
directories to add to pkg-config's search path
|
||||
PKG_CONFIG_LIBDIR
|
||||
path overriding pkg-config's built-in search path
|
||||
QT_QMAKE value of host_bins for Qt5Core >= 5.9.5, overriding pkg-config
|
||||
QT_QMAKE value of host_bins for Qt5Core >= 5.11, overriding pkg-config
|
||||
Qt5Svg_CFLAGS
|
||||
C compiler flags for Qt5Svg, overriding pkg-config
|
||||
Qt5Svg_LIBS linker flags for Qt5Svg, overriding pkg-config
|
||||
@@ -1538,7 +1538,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
qbittorrent configure v4.3.3
|
||||
qbittorrent configure v4.3.5
|
||||
generated by GNU Autoconf 2.70
|
||||
|
||||
Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
@@ -1700,7 +1700,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.3.3, which was
|
||||
It was created by qbittorrent $as_me v4.3.5, which was
|
||||
generated by GNU Autoconf 2.70. Invocation command line was
|
||||
|
||||
$ $0$ac_configure_args_raw
|
||||
@@ -4848,7 +4848,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='qbittorrent'
|
||||
VERSION='v4.3.3'
|
||||
VERSION='v4.3.5'
|
||||
|
||||
|
||||
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
|
||||
@@ -5525,8 +5525,8 @@ printf "%s\n" "$enable_webui" >&6; }
|
||||
esac
|
||||
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.9.5\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.9.5") 2>&5
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.11\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.11") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
@@ -5535,12 +5535,12 @@ if test -n "$QT_QMAKE"; then
|
||||
pkg_cv_QT_QMAKE="$QT_QMAKE"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.9.5\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.9.5") 2>&5
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.11\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.11") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_QT_QMAKE=`$PKG_CONFIG --variable="host_bins" "Qt5Core >= 5.9.5" 2>/dev/null`
|
||||
pkg_cv_QT_QMAKE=`$PKG_CONFIG --variable="host_bins" "Qt5Core >= 5.11" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@@ -5570,8 +5570,8 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5 qmake >= 5.9.5" >&5
|
||||
printf %s "checking for Qt5 qmake >= 5.9.5... " >&6; }
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5 qmake >= 5.11" >&5
|
||||
printf %s "checking for Qt5 qmake >= 5.11... " >&6; }
|
||||
if test "x$QT_QMAKE" != "x"
|
||||
then :
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QT_QMAKE" >&5
|
||||
@@ -5598,12 +5598,12 @@ if test -n "$Qt5Svg_CFLAGS"; then
|
||||
pkg_cv_Qt5Svg_CFLAGS="$Qt5Svg_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.5.1\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.5.1") 2>&5
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.11\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.11") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_Qt5Svg_CFLAGS=`$PKG_CONFIG --cflags "Qt5Svg >= 5.5.1" 2>/dev/null`
|
||||
pkg_cv_Qt5Svg_CFLAGS=`$PKG_CONFIG --cflags "Qt5Svg >= 5.11" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@@ -5615,12 +5615,12 @@ if test -n "$Qt5Svg_LIBS"; then
|
||||
pkg_cv_Qt5Svg_LIBS="$Qt5Svg_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.5.1\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.5.1") 2>&5
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.11\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.11") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_Qt5Svg_LIBS=`$PKG_CONFIG --libs "Qt5Svg >= 5.5.1" 2>/dev/null`
|
||||
pkg_cv_Qt5Svg_LIBS=`$PKG_CONFIG --libs "Qt5Svg >= 5.11" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@@ -5641,14 +5641,14 @@ else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Qt5Svg >= 5.5.1" 2>&1`
|
||||
Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Qt5Svg >= 5.11" 2>&1`
|
||||
else
|
||||
Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Qt5Svg >= 5.5.1" 2>&1`
|
||||
Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Qt5Svg >= 5.11" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$Qt5Svg_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "Package requirements (Qt5Svg >= 5.5.1) were not met:
|
||||
as_fn_error $? "Package requirements (Qt5Svg >= 5.11) were not met:
|
||||
|
||||
$Qt5Svg_PKG_ERRORS
|
||||
|
||||
@@ -5688,11 +5688,11 @@ case "x$enable_qt_dbus" in #(
|
||||
"xyes") :
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5DBus >= 5.9.5" >&5
|
||||
printf %s "checking for Qt5DBus >= 5.9.5... " >&6; }
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5DBus >= 5.11" >&5
|
||||
printf %s "checking for Qt5DBus >= 5.11... " >&6; }
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5DBus >= 5.9.5\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5DBus >= 5.9.5") 2>&5
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5DBus >= 5.11\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5DBus >= 5.11") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
@@ -6354,12 +6354,12 @@ if test -n "$libtorrent_CFLAGS"; then
|
||||
pkg_cv_libtorrent_CFLAGS="$libtorrent_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.11\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.11") 2>&5
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.12\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.12") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 1.2.11" 2>/dev/null`
|
||||
pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 1.2.12" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@@ -6371,12 +6371,12 @@ if test -n "$libtorrent_LIBS"; then
|
||||
pkg_cv_libtorrent_LIBS="$libtorrent_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.11\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.11") 2>&5
|
||||
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.12\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.12") 2>&5
|
||||
ac_status=$?
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 1.2.11" 2>/dev/null`
|
||||
pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 1.2.12" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@@ -6397,14 +6397,14 @@ else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.11" 2>&1`
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.12" 2>&1`
|
||||
else
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.11" 2>&1`
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.12" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$libtorrent_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "Package requirements (libtorrent-rasterbar >= 1.2.11) were not met:
|
||||
as_fn_error $? "Package requirements (libtorrent-rasterbar >= 1.2.12) were not met:
|
||||
|
||||
$libtorrent_PKG_ERRORS
|
||||
|
||||
@@ -7401,7 +7401,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.3.3, which was
|
||||
This file was extended by qbittorrent $as_me v4.3.5, which was
|
||||
generated by GNU Autoconf 2.70. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -7461,7 +7461,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.3.3
|
||||
qbittorrent config.status v4.3.5
|
||||
configured by $0, generated by GNU Autoconf 2.70,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
AC_INIT([qbittorrent], [v4.3.3], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
||||
AC_INIT([qbittorrent], [v4.3.5], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
: ${CFLAGS=""}
|
||||
@@ -141,7 +141,7 @@ AS_IF([test "x$QT_QMAKE" = "x"],
|
||||
[AC_MSG_ERROR([Could not find qmake])
|
||||
])
|
||||
AS_IF([test "x$enable_gui" = "xyes"],
|
||||
[PKG_CHECK_MODULES(Qt5Svg, [Qt5Svg >= 5.5.1])
|
||||
[PKG_CHECK_MODULES(Qt5Svg, [Qt5Svg >= 5.11])
|
||||
])
|
||||
AC_MSG_CHECKING([whether QtDBus should be enabled])
|
||||
AS_CASE(["x$enable_qt_dbus"],
|
||||
@@ -180,7 +180,7 @@ AC_MSG_NOTICE([Boost.System LIB: "$BOOST_SYSTEM_LIB"])
|
||||
LIBS="$BOOST_SYSTEM_LIB $LIBS"
|
||||
|
||||
PKG_CHECK_MODULES(libtorrent,
|
||||
[libtorrent-rasterbar >= 1.2.11],
|
||||
[libtorrent-rasterbar >= 1.2.12],
|
||||
[CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS"
|
||||
LIBS="$libtorrent_LIBS $LIBS"])
|
||||
|
||||
|
||||
6
dist/mac/Info.plist
vendored
6
dist/mac/Info.plist
vendored
@@ -47,7 +47,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleName</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<string>qBittorrent</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>qbittorrent_mac.icns</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
@@ -55,9 +55,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.3.3</string>
|
||||
<string>4.3.5</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.qbittorrent.qBittorrent</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
||||
@@ -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.3.3" date="2021-01-19"/>
|
||||
<release version="4.3.5" date="2021-05-02"/>
|
||||
</releases>
|
||||
</component>
|
||||
|
||||
15
dist/unix/org.qbittorrent.qBittorrent.desktop
vendored
15
dist/unix/org.qbittorrent.qBittorrent.desktop
vendored
@@ -118,6 +118,9 @@ Name[lt]=qBittorrent
|
||||
Comment[mk]=Превземајте и споделувајте фајлови преку BitTorrent
|
||||
GenericName[mk]=BitTorrent клиент
|
||||
Name[mk]=qBittorrent
|
||||
Comment[en_AU]=Download and share files over BitTorrent
|
||||
GenericName[en_AU]=BitTorrent client
|
||||
Name[en_AU]=qBittorrent
|
||||
Comment[nb]=Last ned og del filer over BitTorrent
|
||||
GenericName[nb]=BitTorrent-klient
|
||||
Name[nb]=qBittorrent
|
||||
@@ -133,7 +136,7 @@ Name[pl]=qBittorrent
|
||||
Comment[pt]=Transferir e partilhar ficheiros por BitTorrent
|
||||
GenericName[pt]=Cliente BitTorrent
|
||||
Name[pt]=qBittorrent
|
||||
Comment[pt_BR]=Baixe e compartilhe arquivos por BitTorrent
|
||||
Comment[pt_BR]=Baixe e compartilhe arquivos pelo BitTorrent
|
||||
GenericName[pt_BR]=Cliente BitTorrent
|
||||
Name[pt_BR]=qBittorrent
|
||||
Comment[ro]=Descărcați și partajați fișiere prin BitTorrent
|
||||
@@ -163,8 +166,8 @@ Comment[ltg]=Atsasyuteit i daleit failus ar BitTorrent
|
||||
GenericName[ltg]=BitTorrent klients
|
||||
Name[ltg]=qBittorrent
|
||||
Comment[hi_IN]=BitTorrent द्वारा फाइल डाउनलोड व सहभाजन
|
||||
GenericName[hi_IN]=BitTorrent साधन
|
||||
Name[hi_IN]=qBittorrent
|
||||
GenericName[hi_IN]=Bittorrent साधन
|
||||
Name[hi_IN]=क्यूबिटटाॅरेंट
|
||||
Comment[tr]=Dosyaları BitTorrent üzerinden indirin ve paylaşın
|
||||
GenericName[tr]=BitTorrent istemcisi
|
||||
Name[tr]=qBittorrent
|
||||
@@ -207,9 +210,9 @@ Name[ne_NP]=qBittorrent
|
||||
Comment[te]=క్యు బిట్ టొరెంట్ తో ఫైల్స్ దిగుమతి చేసుకోండి , పంచుకోండి
|
||||
GenericName[te]=క్యు బిట్ టొరెంట్ క్లయింట్
|
||||
Name[te]=క్యు బిట్ టొరెంట్
|
||||
Comment[en_AU]=Download and share files over BitTorrent
|
||||
GenericName[en_AU]=BitTorrent client
|
||||
Name[en_AU]=qBittorrent
|
||||
Comment[pt_PT]=Transferir e partilhar ficheiros por BitTorrent
|
||||
GenericName[pt_PT]=Cliente BitTorrent
|
||||
Name[pt_PT]=qBittorrent
|
||||
Comment[th]=ดาวน์โหลดและแชร์ไฟล์ด้วยบิททอเร้น
|
||||
GenericName[th]=โปรแกรมบิททอเร้น
|
||||
Name[th]=qBittorrent
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Description=qBittorrent-nox service for user %I
|
||||
Documentation=man:qbittorrent-nox(1)
|
||||
Wants=network-online.target
|
||||
After=network-online.target nss-lookup.target
|
||||
After=local-fs.target network-online.target nss-lookup.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_AFRIKAANS} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_AFRIKAANS} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_AFRIKAANS} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_AFRIKAANS} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_ALBANIAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_ALBANIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_ALBANIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_ALBANIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_ARABIC} "تشغيل البرنامج"
|
||||
LangString inst_requires_64bit ${LANG_ARABIC} "هذا المثبت يعمل فقط في نسخ ويندوز 64 بت"
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_ARABIC} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_ARABIC} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_BASQUE} "Abiarazi qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_BASQUE} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_BASQUE} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_BASQUE} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_BELARUSIAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_BELARUSIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_BELARUSIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_BELARUSIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_BOSNIAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_BOSNIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_BOSNIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_BOSNIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_BRETON} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_BRETON} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_BRETON} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_BRETON} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_BULGARIAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_BULGARIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_BULGARIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_BULGARIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_CATALAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_CATALAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_CATALAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_CATALAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_CROATIAN} "Pokreni qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_CROATIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_CROATIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_CROATIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -7,7 +7,7 @@ LangString inst_dekstop ${LANG_CZECH} "Vytvořit zástupce na ploše"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_CZECH} "Vytvořit zástupce v nabídce Start"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
LangString inst_startup ${LANG_CZECH} "Spusťte aplikaci qBittorrent ve Windows"
|
||||
LangString inst_startup ${LANG_CZECH} "Spustit qBittorrent při startu Windows"
|
||||
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_CZECH} "Otevírat .torrent soubory pomocí qBittorrent"
|
||||
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
||||
@@ -15,9 +15,9 @@ LangString inst_magnet ${LANG_CZECH} "Otevírat odkazy Magnet pomocí qBittorren
|
||||
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_CZECH} "Vytvořit pravidlo ve Windows Firewall"
|
||||
;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
|
||||
LangString inst_pathlimit ${LANG_CZECH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
|
||||
LangString inst_pathlimit ${LANG_CZECH} "Vypnout MAX_PATH limit 260 znaků pro cesty (vyžaduje Windows 10 1607 a novější)"
|
||||
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_CZECH} "Vytváření pravidla ve Windows Firewall"
|
||||
LangString inst_firewallinfo ${LANG_CZECH} "Přidávání pravidla do Windows Firewall"
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_CZECH} "qBittorrent je spuštěn. Před instalací aplikaci ukončete, prosím."
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_CZECH} "Spustit qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_CZECH} "Tento instalátor funguje pouze v 64-bit Windows."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_CZECH} "Tato verze qBittorrent vyžaduje minimálně Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_CZECH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_DANISH} "Start qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_DANISH} "Dette installationsprogram virker kun i 64-bit Windows versioner."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_DANISH} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_DANISH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_DUTCH} "qBittorrent starten."
|
||||
LangString inst_requires_64bit ${LANG_DUTCH} "Dit installatieprogramma werkt alleen in 64-bit Windows-versies."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_DUTCH} "Deze versie van qBittorrent vereist ten minste Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_DUTCH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_ESPERANTO} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_ESPERANTO} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_ESPERANTO} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_ESPERANTO} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
55
dist/windows/installer-translations/estonian.nsi
vendored
55
dist/windows/installer-translations/estonian.nsi
vendored
@@ -1,59 +1,60 @@
|
||||
;Installer strings
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_ESTONIAN} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_ESTONIAN} "qBittorrent (vajalik)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_ESTONIAN} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_ESTONIAN} "Loo Töölaua Otsetee"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_ESTONIAN} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_ESTONIAN} "Loo Start Menüü Otsetee"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
LangString inst_startup ${LANG_ESTONIAN} "Start qBittorrent on Windows start up"
|
||||
LangString inst_startup ${LANG_ESTONIAN} "Käivita qBittorrent Windowsi käivitamisel"
|
||||
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_ESTONIAN} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_ESTONIAN} "Ava .torrent failid qBittorrentiga"
|
||||
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
||||
LangString inst_magnet ${LANG_ESTONIAN} "Open magnet links with qBittorrent"
|
||||
LangString inst_magnet ${LANG_ESTONIAN} "Ava magnet lingid qBittorrentiga"
|
||||
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_ESTONIAN} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_ESTONIAN} "Lisa reegel Windowsi Tulemüüri"
|
||||
;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
|
||||
LangString inst_pathlimit ${LANG_ESTONIAN} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
|
||||
LangString inst_pathlimit ${LANG_ESTONIAN} "Keela Windowsi kaustade pikkuse limiit (260 karakterit MAX_PATH limiit, vajalik Windows 10 1607 või uuemat)"
|
||||
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_ESTONIAN} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_ESTONIAN} "Lisatakse Windowsi Tulemüüri reegel"
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_ESTONIAN} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_ESTONIAN} "qBittorrent töötab. Palun sulge see programm, enne installi."
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
|
||||
LangString inst_uninstall_question ${LANG_ESTONIAN} "Current version will be uninstalled. User settings and torrents will remain intact."
|
||||
LangString inst_uninstall_question ${LANG_ESTONIAN} "Praegune versioon desinstallitakse. Kasutaja sätted ja torrenti failid jäetakse alles."
|
||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_ESTONIAN} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_ESTONIAN} "Desinstallitakse eelmist versiooni."
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_ESTONIAN} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_ESTONIAN} "Käivita qBittorrent."
|
||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_ESTONIAN} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_ESTONIAN} "See installer töötab ainult 64-bit Windowsi versioonides."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_ESTONIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
LangString inst_requires_win7 ${LANG_ESTONIAN} "Selle qBittorrenti versiooni jaoks on vajalik vähemalt Windows 7."
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_ESTONIAN} "Desinstalli qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
;LangString remove_files ${LANG_ENGLISH} "Remove files"
|
||||
LangString remove_files ${LANG_ESTONIAN} "Remove files"
|
||||
LangString remove_files ${LANG_ESTONIAN} "Eemalda failid"
|
||||
;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts"
|
||||
LangString remove_shortcuts ${LANG_ESTONIAN} "Remove shortcuts"
|
||||
LangString remove_shortcuts ${LANG_ESTONIAN} "Eemalda otseteed"
|
||||
;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
|
||||
LangString remove_associations ${LANG_ESTONIAN} "Remove file associations"
|
||||
LangString remove_associations ${LANG_ESTONIAN} "Eemalda failide seotus"
|
||||
;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
|
||||
LangString remove_registry ${LANG_ESTONIAN} "Remove registry keys"
|
||||
LangString remove_registry ${LANG_ESTONIAN} "Eemalda registri võtmed"
|
||||
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
|
||||
LangString remove_conf ${LANG_ESTONIAN} "Remove configuration files"
|
||||
LangString remove_conf ${LANG_ESTONIAN} "Eemalda seadistuste failid"
|
||||
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
|
||||
LangString remove_firewall ${LANG_ESTONIAN} "Remove Windows Firewall rule"
|
||||
LangString remove_firewall ${LANG_ESTONIAN} "Eemalda Windowsi Tulemüüri reegel"
|
||||
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_ESTONIAN} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_ESTONIAN} "Eemaldatakse Windowsi Tulemüüri reegel"
|
||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_ESTONIAN} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_ESTONIAN} "Eemalda torrentid ja ajutised andmed"
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_ESTONIAN} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_ESTONIAN} "qBittorrent töötab. Palun sulge programm, enne uninstallimist."
|
||||
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_ESTONIAN} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_ESTONIAN} "Ei eemaldata .torrent seotust. Mis on seotud:"
|
||||
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_ESTONIAN} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_ESTONIAN} "Ei eemaldata magnetitega seotust. Mis on seotud:"
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_FARSI} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_FARSI} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_FARSI} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_FARSI} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_FINNISH} "Käynnistä qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_FINNISH} "Tämä asennusohjelma toimii vain 64-bittisellä Windowsin versiolla."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_FINNISH} "Tämä qBittorrent versio tarvitsee vähintään Windows 7:n."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_FINNISH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_FRENCH} "Lancer qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_FRENCH} "Cet installateur ne fonctionne que dans les versions 64 bits de Windows."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_FRENCH} "Cette version de qBittorrent nécessite au moins Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_FRENCH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_GALICIAN} "Iniciar qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_GALICIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_GALICIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_GALICIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -7,7 +7,7 @@ LangString inst_dekstop ${LANG_GERMAN} "Verknüpfung auf dem Desktop erstellen"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_GERMAN} "Eintrag im Startmenü erstellen"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
LangString inst_startup ${LANG_GERMAN} "qBittorrent mit Windows mitstarten"
|
||||
LangString inst_startup ${LANG_GERMAN} "qBittorrent mit Windows starten"
|
||||
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_GERMAN} "Öffne .torrent-Dateien mit qBittorrent"
|
||||
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
||||
@@ -29,8 +29,9 @@ LangString launch_qbt ${LANG_GERMAN} "Starte qBittorrent."
|
||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_GERMAN} "Diese Installation funktioniert nur mit einer 64-bit Version von Windows."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_GERMAN} "Diese Version von qBittorrent erfordert zumindest Windows 7."
|
||||
|
||||
LangString inst_requires_win7 ${LANG_GERMAN} "Diese Version von qBittorrent erfordert mindestens Windows 7."
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_GERMAN} "qBittorrent deinstallieren"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_GREEK} "Εκκίνηση του qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_GREEK} "Αυτό το αρχείο εγκατάστασης λειτουργεί μόνο σε 64-bit εκδόσεις των Windows."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_GREEK} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_GREEK} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_HEBREW} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_HEBREW} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_HEBREW} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_HEBREW} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_HUNGARIAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_HUNGARIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_HUNGARIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_HUNGARIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_ICELANDIC} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_ICELANDIC} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_ICELANDIC} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_ICELANDIC} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_INDONESIAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_INDONESIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_INDONESIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_INDONESIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_IRISH} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_IRISH} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_IRISH} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_IRISH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_ITALIAN} "Esegui qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_ITALIAN} "Questo installer funziona solo con versioni di Windows a 64bit."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_ITALIAN} "Questa versione di qBittorrent richiede Windows 7 o versioni successive."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_ITALIAN} "Disinstalla qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_JAPANESE} "qBittorrent を起動"
|
||||
LangString inst_requires_64bit ${LANG_JAPANESE} "このインストーラーは 64 ビット版の Windows でのみ実行できます。"
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_JAPANESE} "このバージョンの qBittorrent には Windows 7 以降が必要です。"
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_JAPANESE} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_KOREAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_KOREAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_KOREAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_KOREAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_KURDISH} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_KURDISH} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_KURDISH} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_KURDISH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_LATVIAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_LATVIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_LATVIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_LATVIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_LITHUANIAN} "Paleisti qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_LITHUANIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_LITHUANIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_LITHUANIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_LUXEMBOURGISH} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_LUXEMBOURGISH} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_LUXEMBOURGISH} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_LUXEMBOURGISH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_MACEDONIAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_MACEDONIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_MACEDONIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_MACEDONIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_MALAY} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_MALAY} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_MALAY} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_MALAY} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_MONGOLIAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_MONGOLIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_MONGOLIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_MONGOLIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_NORWEGIAN} "Sett i gang qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_NORWEGIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_NORWEGIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_NORWEGIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_NORWEGIANNYNORSK} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_NORWEGIANNYNORSK} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_NORWEGIANNYNORSK} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_NORWEGIANNYNORSK} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_POLISH} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_POLISH} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_POLISH} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_POLISH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_PORTUGUESE} "Iniciar qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_PORTUGUESE} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_PORTUGUESE} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_PORTUGUESE} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -5,32 +5,33 @@ LangString inst_qbt_req ${LANG_PORTUGUESEBR} "qBittorrent (requerido)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_PORTUGUESEBR} "Criar Atalho no Desktop"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_PORTUGUESEBR} "Criar Atalho no Menu"
|
||||
LangString inst_startmenu ${LANG_PORTUGUESEBR} "Criar Atalho no Menu Iniciar"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
LangString inst_startup ${LANG_PORTUGUESEBR} "Iniciar o qBittorrent na inicialização do Windows"
|
||||
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_PORTUGUESEBR} "Abrir arquivos .torrent com qBittorrent"
|
||||
LangString inst_torrent ${LANG_PORTUGUESEBR} "Abrir arquivos .torrent com o qBittorrent"
|
||||
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
||||
LangString inst_magnet ${LANG_PORTUGUESEBR} "Abrir links magnéticos com qBittorrent"
|
||||
LangString inst_magnet ${LANG_PORTUGUESEBR} "Abrir links magnet com o qBittorrent"
|
||||
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_PORTUGUESEBR} "Adicionar regra no firewall do Windows"
|
||||
;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
|
||||
LangString inst_pathlimit ${LANG_PORTUGUESEBR} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
|
||||
LangString inst_pathlimit ${LANG_PORTUGUESEBR} "Desativar limite de comprimento do caminho do Windows (limite MAX_PATH de 260 caracteres, requer Windows 10 1067 ou superior)"
|
||||
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_PORTUGUESEBR} "Adicionando regra no firewall do Windows"
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_PORTUGUESEBR} "qBittorrent está rodando. Por favor feche a aplicação antes de instalar."
|
||||
LangString inst_warning ${LANG_PORTUGUESEBR} "O qBittorrent está em execução. Por favor feche o aplicativo antes de instalar."
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
|
||||
LangString inst_uninstall_question ${LANG_PORTUGUESEBR} "Uma instalação anterior foi detectada. Ela será desistalada sem deletar as configurações de usuário."
|
||||
LangString inst_uninstall_question ${LANG_PORTUGUESEBR} "A versão atual será desinstalada. As configurações e os torrentes do usuário permanecerão intactos."
|
||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_PORTUGUESEBR} "Desinstalando versão anterior."
|
||||
LangString inst_unist ${LANG_PORTUGUESEBR} "Desinstalando a versão anterior."
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_PORTUGUESEBR} "Executar qBittorrent."
|
||||
LangString launch_qbt ${LANG_PORTUGUESEBR} "Executar o qBittorrent."
|
||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_PORTUGUESEBR} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_PORTUGUESEBR} "Este instalador só funciona nas versões 64 bits do Windows."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_PORTUGUESEBR} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
LangString inst_requires_win7 ${LANG_PORTUGUESEBR} "Esta versão do qBittorrent requer no mínimo o Windows 7."
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_PORTUGUESEBR} "Desinstalar o qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
@@ -40,20 +41,20 @@ LangString remove_files ${LANG_PORTUGUESEBR} "Remover arquivos"
|
||||
;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts"
|
||||
LangString remove_shortcuts ${LANG_PORTUGUESEBR} "Remover atalhos"
|
||||
;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
|
||||
LangString remove_associations ${LANG_PORTUGUESEBR} "Remover associação de arquivos"
|
||||
LangString remove_associations ${LANG_PORTUGUESEBR} "Remover associações dos arquivos"
|
||||
;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
|
||||
LangString remove_registry ${LANG_PORTUGUESEBR} "Remover registros"
|
||||
LangString remove_registry ${LANG_PORTUGUESEBR} "Remover chaves do registro"
|
||||
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
|
||||
LangString remove_conf ${LANG_PORTUGUESEBR} "Remover configurações"
|
||||
LangString remove_conf ${LANG_PORTUGUESEBR} "Remover os arquivos das configurações"
|
||||
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
|
||||
LangString remove_firewall ${LANG_PORTUGUESEBR} "Remover regras do firewall do Windows"
|
||||
LangString remove_firewall ${LANG_PORTUGUESEBR} "Remover regra do Firewall do Windows"
|
||||
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_PORTUGUESEBR} "Removendo regras do firewall do Windows"
|
||||
LangString remove_firewallinfo ${LANG_PORTUGUESEBR} "Removendo regra do Firewall do Windows"
|
||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_PORTUGUESEBR} "Remover torrents e dados em cache"
|
||||
LangString remove_cache ${LANG_PORTUGUESEBR} "Remover os torrentes e dados no cache"
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_PORTUGUESEBR} "qBittorrent está rodando. Por favor feche a aplicação antes de desinstalar."
|
||||
LangString uninst_warning ${LANG_PORTUGUESEBR} "O qBittorrent está em execução. Por favor feche o aplicativo antes de desinstalar."
|
||||
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_PORTUGUESEBR} "Não removendo associação com .torrent. Está associado com:"
|
||||
LangString uninst_tor_warn ${LANG_PORTUGUESEBR} "Não removendo a associação com o .torrent. Está associado com:"
|
||||
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_PORTUGUESEBR} "Não removendo associação com links magnéticos. Está associado com:"
|
||||
LangString uninst_mag_warn ${LANG_PORTUGUESEBR} "Não removendo a associação com o magnet. Está associado com:"
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_ROMANIAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_ROMANIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_ROMANIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_ROMANIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -21,16 +21,17 @@ LangString inst_firewallinfo ${LANG_RUSSIAN} "Добавление в списо
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_RUSSIAN} "qBittorrent запущен. Пожалуйста, закройте qBittorrent и перезапустите программу установки."
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
|
||||
LangString inst_uninstall_question ${LANG_RUSSIAN} "Текущая версия будет деинсталлирована. Пользовательские настройки и торренты останутся нетронутыми."
|
||||
LangString inst_uninstall_question ${LANG_RUSSIAN} "Текущая версия будет удалена. Пользовательские настройки и торренты останутся нетронутыми."
|
||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_RUSSIAN} "Деинсталлируется старая версия."
|
||||
LangString inst_unist ${LANG_RUSSIAN} "Удаляется старая версия."
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_RUSSIAN} "Запустить qBittorrent."
|
||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_RUSSIAN} "Этот установщик работает только на 64-битных версиях Windows."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_RUSSIAN} "Для работы этой версии qBittorrent требуется Windows 7 или выше."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_RUSSIAN} "Удалить qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
@@ -52,7 +53,7 @@ LangString remove_firewallinfo ${LANG_RUSSIAN} "Удаление из списк
|
||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_RUSSIAN} "Удалить сохранённые торрент-файлы"
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_RUSSIAN} "qBittorrent запущен. Пожалуйста, закройте qBittorrent и перезапустите программу удаления."
|
||||
LangString uninst_warning ${LANG_RUSSIAN} "qBittorrent запущен. Пожалуйста, закройте qBittorrent перед удалением."
|
||||
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_RUSSIAN} "Ассоциации торрент-файлов не сброшены. Уже ассоциированы с:"
|
||||
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_SERBIAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_SERBIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_SERBIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_SERBIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_SERBIANLATIN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_SERBIANLATIN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_SERBIANLATIN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_SERBIANLATIN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_SIMPCHINESE} "启动 qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_SIMPCHINESE} "此安装程序只能在64位的Windows上工作。"
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_SIMPCHINESE} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_SIMPCHINESE} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_SLOVAK} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_SLOVAK} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_SLOVAK} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_SLOVAK} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_SLOVENIAN} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_SLOVENIAN} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_SLOVENIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_SLOVENIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_SPANISH} "Iniciar qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_SPANISH} "Este instalador solo funciona en versiones de 64-bit de Windows."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_SPANISH} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_SPANISH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_SPANISHINTERNATIONAL} "Iniciar qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_SPANISHINTERNATIONAL} "Este instalador solo funciona en versiones de 64-bit de Windows."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_SPANISHINTERNATIONAL} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_SPANISHINTERNATIONAL} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_SWEDISH} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_SWEDISH} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_SWEDISH} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_SWEDISH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
3
dist/windows/installer-translations/thai.nsi
vendored
3
dist/windows/installer-translations/thai.nsi
vendored
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_THAI} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_THAI} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_THAI} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_THAI} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_TRADCHINESE} "啟動 qBittorrent"
|
||||
LangString inst_requires_64bit ${LANG_TRADCHINESE} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_TRADCHINESE} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_TRADCHINESE} "移除 qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_TURKISH} "qBittorrent'i başlat"
|
||||
LangString inst_requires_64bit ${LANG_TURKISH} "Bu yükleyici sadece 64-bit Windows sürümlerinde çalışır."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_TURKISH} "Bu qBittorrent sürümü en az Windows 7 gerektirir."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_TURKISH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_UKRAINIAN} "Запустити qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_UKRAINIAN} "Ця програма установки працює тільки в 64-розрядних версіях Windows."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_UKRAINIAN} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_UKRAINIAN} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_UZBEK} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_UZBEK} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_UZBEK} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_UZBEK} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
@@ -30,7 +30,8 @@ LangString launch_qbt ${LANG_WELSH} "Launch qBittorrent."
|
||||
LangString inst_requires_64bit ${LANG_WELSH} "This installer works only in 64-bit Windows versions."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_WELSH} "This qBittorrent version requires at least Windows 7."
|
||||
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_WELSH} "Uninstall qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
2
dist/windows/installer.nsi
vendored
2
dist/windows/installer.nsi
vendored
@@ -78,7 +78,7 @@ Section $(inst_startmenu) ;"Create Start Menu Shortcut"
|
||||
|
||||
CreateDirectory "$SMPROGRAMS\qBittorrent"
|
||||
CreateShortCut "$SMPROGRAMS\qBittorrent\qBittorrent.lnk" "$INSTDIR\qbittorrent.exe"
|
||||
CreateShortCut "$SMPROGRAMS\qBittorrent\Uninstall.lnk" "$INSTDIR\uninst.exe"
|
||||
CreateShortCut "$SMPROGRAMS\qBittorrent\$(inst_uninstall_link_description).lnk" "$INSTDIR\uninst.exe"
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
||||
2
dist/windows/options.nsi
vendored
2
dist/windows/options.nsi
vendored
@@ -28,7 +28,7 @@ XPStyle on
|
||||
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
|
||||
|
||||
; Program specific
|
||||
!define PROG_VERSION "4.3.3"
|
||||
!define PROG_VERSION "4.3.5"
|
||||
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
# Sets the QT_QMAKE variable to the path of Qt5 qmake if found.
|
||||
# --------------------------------------
|
||||
AC_DEFUN([FIND_QT5],
|
||||
[PKG_CHECK_EXISTS([Qt5Core >= 5.9.5],
|
||||
[PKG_CHECK_EXISTS([Qt5Core >= 5.11],
|
||||
[PKG_CHECK_VAR(QT_QMAKE,
|
||||
[Qt5Core >= 5.9.5],
|
||||
[Qt5Core >= 5.11],
|
||||
[host_bins])
|
||||
])
|
||||
|
||||
@@ -18,7 +18,7 @@ AS_IF([test -f "$QT_QMAKE/qmake"],
|
||||
[QT_QMAKE=""])
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([for Qt5 qmake >= 5.9.5])
|
||||
AC_MSG_CHECKING([for Qt5 qmake >= 5.11])
|
||||
AS_IF([test "x$QT_QMAKE" != "x"],
|
||||
[AC_MSG_RESULT([$QT_QMAKE])],
|
||||
[AC_MSG_RESULT([not found])]
|
||||
@@ -29,8 +29,8 @@ AS_IF([test "x$QT_QMAKE" != "x"],
|
||||
# Sets the HAVE_QTDBUS variable to true or false.
|
||||
# --------------------------------------
|
||||
AC_DEFUN([FIND_QTDBUS],
|
||||
[AC_MSG_CHECKING([for Qt5DBus >= 5.9.5])
|
||||
PKG_CHECK_EXISTS([Qt5DBus >= 5.9.5],
|
||||
[AC_MSG_CHECKING([for Qt5DBus >= 5.11])
|
||||
PKG_CHECK_EXISTS([Qt5DBus >= 5.11],
|
||||
[AC_MSG_RESULT([found])
|
||||
HAVE_QTDBUS=[true]],
|
||||
[AC_MSG_RESULT([not found])
|
||||
|
||||
@@ -83,18 +83,14 @@ set_source_files_properties(
|
||||
)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
# substitute @EXECUTABLE@ in dist/mac/Info.plist
|
||||
get_target_property(EXECUTABLE qbt_app OUTPUT_NAME)
|
||||
configure_file(${qBittorrent_SOURCE_DIR}/dist/mac/Info.plist
|
||||
${qBittorrent_BINARY_DIR}/dist/mac/pregen.plist @ONLY)
|
||||
file(GENERATE
|
||||
OUTPUT ${qBittorrent_BINARY_DIR}/dist/mac/Info.plist
|
||||
INPUT ${qBittorrent_BINARY_DIR}/dist/mac/pregen.plist
|
||||
)
|
||||
# provide variables for substitution in dist/mac/Info.plist
|
||||
get_target_property(EXECUTABLE_NAME qbt_app OUTPUT_NAME)
|
||||
# This variable name should be changed once qmake is no longer used. Refer to the discussion in PR #14813
|
||||
set(MACOSX_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET})
|
||||
set_target_properties(qbt_app PROPERTIES
|
||||
MACOSX_BUNDLE ON
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "${EXECUTABLE}"
|
||||
MACOSX_BUNDLE_INFO_PLIST ${qBittorrent_BINARY_DIR}/dist/mac/Info.plist
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "qBittorrent"
|
||||
MACOSX_BUNDLE_INFO_PLIST ${qBittorrent_SOURCE_DIR}/dist/mac/Info.plist
|
||||
)
|
||||
target_sources(qbt_app PRIVATE
|
||||
${QT_TRANSLATIONS}
|
||||
|
||||
@@ -313,14 +313,6 @@ void Application::processMessage(const QString &message)
|
||||
|
||||
void Application::runExternalProgram(const BitTorrent::Torrent *torrent) const
|
||||
{
|
||||
QString program = Preferences::instance()->getAutoRunProgram().trimmed();
|
||||
program.replace("%N", torrent->name());
|
||||
program.replace("%L", torrent->category());
|
||||
|
||||
QStringList tags = torrent->tags().values();
|
||||
std::sort(tags.begin(), tags.end(), Utils::String::naturalLessThan<Qt::CaseInsensitive>);
|
||||
program.replace("%G", tags.join(','));
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
const auto chopPathSep = [](const QString &str) -> QString
|
||||
{
|
||||
@@ -328,21 +320,74 @@ void Application::runExternalProgram(const BitTorrent::Torrent *torrent) const
|
||||
return str.mid(0, (str.length() -1));
|
||||
return str;
|
||||
};
|
||||
program.replace("%F", chopPathSep(Utils::Fs::toNativePath(torrent->contentPath())));
|
||||
program.replace("%R", chopPathSep(Utils::Fs::toNativePath(torrent->rootPath())));
|
||||
program.replace("%D", chopPathSep(Utils::Fs::toNativePath(torrent->savePath())));
|
||||
#else
|
||||
program.replace("%F", Utils::Fs::toNativePath(torrent->contentPath()));
|
||||
program.replace("%R", Utils::Fs::toNativePath(torrent->rootPath()));
|
||||
program.replace("%D", Utils::Fs::toNativePath(torrent->savePath()));
|
||||
#endif
|
||||
program.replace("%C", QString::number(torrent->filesCount()));
|
||||
program.replace("%Z", QString::number(torrent->totalSize()));
|
||||
program.replace("%T", torrent->currentTracker());
|
||||
program.replace("%I", torrent->hash());
|
||||
|
||||
Logger *logger = Logger::instance();
|
||||
logger->addMessage(tr("Torrent: %1, running external program, command: %2").arg(torrent->name(), program));
|
||||
QString program = Preferences::instance()->getAutoRunProgram().trimmed();
|
||||
|
||||
for (int i = (program.length() - 2); i >= 0; --i)
|
||||
{
|
||||
if (program[i] != QLatin1Char('%'))
|
||||
continue;
|
||||
|
||||
const ushort specifier = program[i + 1].unicode();
|
||||
switch (specifier)
|
||||
{
|
||||
case u'C':
|
||||
program.replace(i, 2, QString::number(torrent->filesCount()));
|
||||
break;
|
||||
case u'D':
|
||||
#if defined(Q_OS_WIN)
|
||||
program.replace(i, 2, chopPathSep(Utils::Fs::toNativePath(torrent->savePath())));
|
||||
#else
|
||||
program.replace(i, 2, Utils::Fs::toNativePath(torrent->savePath()));
|
||||
#endif
|
||||
break;
|
||||
case u'F':
|
||||
#if defined(Q_OS_WIN)
|
||||
program.replace(i, 2, chopPathSep(Utils::Fs::toNativePath(torrent->contentPath())));
|
||||
#else
|
||||
program.replace(i, 2, Utils::Fs::toNativePath(torrent->contentPath()));
|
||||
#endif
|
||||
break;
|
||||
case u'G':
|
||||
{
|
||||
QStringList tags = torrent->tags().values();
|
||||
std::sort(tags.begin(), tags.end(), Utils::String::naturalLessThan<Qt::CaseInsensitive>);
|
||||
program.replace(i, 2, tags.join(','));
|
||||
}
|
||||
break;
|
||||
case u'I':
|
||||
program.replace(i, 2, torrent->id().toString());
|
||||
break;
|
||||
case u'L':
|
||||
program.replace(i, 2, torrent->category());
|
||||
break;
|
||||
case u'N':
|
||||
program.replace(i, 2, torrent->name());
|
||||
break;
|
||||
case u'R':
|
||||
#if defined(Q_OS_WIN)
|
||||
program.replace(i, 2, chopPathSep(Utils::Fs::toNativePath(torrent->rootPath())));
|
||||
#else
|
||||
program.replace(i, 2, Utils::Fs::toNativePath(torrent->rootPath()));
|
||||
#endif
|
||||
break;
|
||||
case u'T':
|
||||
program.replace(i, 2, torrent->currentTracker());
|
||||
break;
|
||||
case u'Z':
|
||||
program.replace(i, 2, QString::number(torrent->totalSize()));
|
||||
break;
|
||||
default:
|
||||
// do nothing
|
||||
break;
|
||||
}
|
||||
|
||||
// decrement `i` to avoid unwanted replacement, example pattern: "%%N"
|
||||
--i;
|
||||
}
|
||||
|
||||
LogMsg(tr("Torrent: %1, running external program, command: %2").arg(torrent->name(), program));
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
auto programWchar = std::make_unique<wchar_t[]>(program.length() + 1);
|
||||
@@ -358,7 +403,6 @@ void Application::runExternalProgram(const BitTorrent::Torrent *torrent) const
|
||||
for (int i = 1; i < argCount; ++i)
|
||||
argList += QString::fromWCharArray(args[i]);
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
QProcess proc;
|
||||
proc.setProgram(QString::fromWCharArray(args[0]));
|
||||
proc.setArguments(argList);
|
||||
@@ -384,9 +428,6 @@ void Application::runExternalProgram(const BitTorrent::Torrent *torrent) const
|
||||
args->startupInfo->hStdError = nullptr;
|
||||
});
|
||||
proc.startDetached();
|
||||
#else
|
||||
QProcess::startDetached(QString::fromWCharArray(args[0]), argList);
|
||||
#endif // QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
#else // Q_OS_WIN
|
||||
// Cannot give users shell environment by default, as doing so could
|
||||
// enable command injection via torrent name and other arguments
|
||||
|
||||
@@ -235,7 +235,7 @@ int main(int argc, char *argv[])
|
||||
// 3. https://bugreports.qt.io/browse/QTBUG-46015
|
||||
|
||||
qputenv("QT_BEARER_POLL_TIMEOUT", QByteArray::number(-1));
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) && !defined(DISABLE_GUI)
|
||||
#if !defined(DISABLE_GUI)
|
||||
// this is the default in Qt6
|
||||
app->setAttribute(Qt::AA_DisableWindowContextHelpButton);
|
||||
#endif
|
||||
@@ -251,6 +251,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
// On OS X the standard is to not show icons in the menus
|
||||
app->setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||
#else
|
||||
if (!Preferences::instance()->iconsInMenusEnabled())
|
||||
app->setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||
#endif
|
||||
|
||||
if (!firstTimeUser)
|
||||
@@ -378,11 +381,7 @@ void showSplashScreen()
|
||||
const QString version = QBT_VERSION;
|
||||
painter.setPen(QPen(Qt::white));
|
||||
painter.setFont(QFont("Arial", 22, QFont::Black));
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
|
||||
painter.drawText(224 - painter.fontMetrics().horizontalAdvance(version), 270, version);
|
||||
#else
|
||||
painter.drawText(224 - painter.fontMetrics().width(version), 270, version);
|
||||
#endif
|
||||
QSplashScreen *splash = new QSplashScreen(splashImg);
|
||||
splash->show();
|
||||
QTimer::singleShot(1500, splash, &QObject::deleteLater);
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <dbghelp.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
#include <QTextStream>
|
||||
#ifdef __MINGW32__
|
||||
@@ -256,7 +257,7 @@ const QString straceWin::getBacktrace()
|
||||
|
||||
HANDLE hProcess = GetCurrentProcess();
|
||||
HANDLE hThread = GetCurrentThread();
|
||||
SymInitialize(hProcess, NULL, TRUE);
|
||||
SymInitializeW(hProcess, QCoreApplication::applicationDirPath().toStdWString().c_str(), TRUE);
|
||||
|
||||
DWORD64 dwDisplacement;
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ add_library(qbt_base STATIC
|
||||
bittorrent/torrentinfo.h
|
||||
bittorrent/tracker.h
|
||||
bittorrent/trackerentry.h
|
||||
digest32.h
|
||||
exceptions.h
|
||||
filesystemwatcher.h
|
||||
global.h
|
||||
|
||||
@@ -55,13 +55,8 @@ AsyncFileStorage::~AsyncFileStorage()
|
||||
|
||||
void AsyncFileStorage::store(const QString &fileName, const QByteArray &data)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
QMetaObject::invokeMethod(this, [this, data, fileName]() { store_impl(fileName, data); }
|
||||
, Qt::QueuedConnection);
|
||||
#else
|
||||
QMetaObject::invokeMethod(this, "store_impl", Qt::QueuedConnection
|
||||
, Q_ARG(QString, fileName), Q_ARG(QByteArray, data));
|
||||
#endif
|
||||
}
|
||||
|
||||
QDir AsyncFileStorage::storageDir() const
|
||||
|
||||
@@ -31,6 +31,7 @@ HEADERS += \
|
||||
$$PWD/bittorrent/torrentinfo.h \
|
||||
$$PWD/bittorrent/tracker.h \
|
||||
$$PWD/bittorrent/trackerentry.h \
|
||||
$$PWD/digest32.h \
|
||||
$$PWD/exceptions.h \
|
||||
$$PWD/filesystemwatcher.h \
|
||||
$$PWD/global.h \
|
||||
|
||||
@@ -78,8 +78,7 @@ void BitTorrent::AbstractFileStorage::renameFile(const QString &oldPath, const Q
|
||||
|
||||
if ((renamingFileIndex < 0) && areSameFileNames(path, oldFilePath))
|
||||
renamingFileIndex = i;
|
||||
|
||||
if (areSameFileNames(path, newFilePath))
|
||||
else if (areSameFileNames(path, newFilePath))
|
||||
throw RuntimeError {tr("The file already exists: '%1'.").arg(newFilePath)};
|
||||
}
|
||||
|
||||
@@ -124,8 +123,7 @@ void BitTorrent::AbstractFileStorage::renameFolder(const QString &oldPath, const
|
||||
|
||||
if (path.startsWith(oldFolderPath, CASE_SENSITIVITY))
|
||||
renamingFileIndexes.append(i);
|
||||
|
||||
if (path.startsWith(newFolderPath, CASE_SENSITIVITY))
|
||||
else if (path.startsWith(newFolderPath, CASE_SENSITIVITY))
|
||||
throw RuntimeError {tr("The folder already exists: '%1'.").arg(newFolderPath)};
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "base/bittorrent/common.h"
|
||||
#include "base/bittorrent/infohash.h"
|
||||
|
||||
void FileSearcher::search(const BitTorrent::InfoHash &id, const QStringList &originalFileNames
|
||||
void FileSearcher::search(const BitTorrent::TorrentID &id, const QStringList &originalFileNames
|
||||
, const QString &completeSavePath, const QString &incompleteSavePath)
|
||||
{
|
||||
const auto findInDir = [](const QString &dirPath, QStringList &fileNames) -> bool
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
class InfoHash;
|
||||
class TorrentID;
|
||||
}
|
||||
|
||||
class FileSearcher final : public QObject
|
||||
@@ -44,9 +44,9 @@ public:
|
||||
FileSearcher() = default;
|
||||
|
||||
public slots:
|
||||
void search(const BitTorrent::InfoHash &id, const QStringList &originalFileNames
|
||||
void search(const BitTorrent::TorrentID &id, const QStringList &originalFileNames
|
||||
, const QString &completeSavePath, const QString &incompleteSavePath);
|
||||
|
||||
signals:
|
||||
void searchFinished(const BitTorrent::InfoHash &id, const QString &savePath, const QStringList &fileNames);
|
||||
void searchFinished(const BitTorrent::TorrentID &id, const QString &savePath, const QStringList &fileNames);
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2015, 2021 Vladimir Golovnev <glassez@yandex.ru>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -28,68 +28,54 @@
|
||||
|
||||
#include "infohash.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QHash>
|
||||
const int TorrentIDTypeId = qRegisterMetaType<BitTorrent::TorrentID>();
|
||||
|
||||
using namespace BitTorrent;
|
||||
|
||||
const int InfoHashTypeId = qRegisterMetaType<InfoHash>();
|
||||
|
||||
InfoHash::InfoHash(const lt::sha1_hash &nativeHash)
|
||||
: m_valid(true)
|
||||
, m_nativeHash(nativeHash)
|
||||
BitTorrent::InfoHash::InfoHash(const WrappedType &nativeHash)
|
||||
: m_valid {true}
|
||||
, m_nativeHash {nativeHash}
|
||||
{
|
||||
const QByteArray raw = QByteArray::fromRawData(nativeHash.data(), length());
|
||||
m_hashString = QString::fromLatin1(raw.toHex());
|
||||
}
|
||||
|
||||
InfoHash::InfoHash(const QString &hashString)
|
||||
: m_valid(false)
|
||||
{
|
||||
if (hashString.size() != (length() * 2))
|
||||
return;
|
||||
|
||||
const QByteArray raw = QByteArray::fromHex(hashString.toLatin1());
|
||||
if (raw.size() != length()) // QByteArray::fromHex() will skip over invalid characters
|
||||
return;
|
||||
|
||||
m_valid = true;
|
||||
m_hashString = hashString;
|
||||
m_nativeHash.assign(raw.constData());
|
||||
}
|
||||
|
||||
bool InfoHash::isValid() const
|
||||
bool BitTorrent::InfoHash::isValid() const
|
||||
{
|
||||
return m_valid;
|
||||
}
|
||||
|
||||
InfoHash::operator lt::sha1_hash() const
|
||||
BitTorrent::TorrentID BitTorrent::InfoHash::toTorrentID() const
|
||||
{
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
return m_nativeHash.get_best();
|
||||
#else
|
||||
return {m_nativeHash};
|
||||
#endif
|
||||
}
|
||||
|
||||
BitTorrent::InfoHash::operator WrappedType() const
|
||||
{
|
||||
return m_nativeHash;
|
||||
}
|
||||
|
||||
InfoHash::operator QString() const
|
||||
BitTorrent::TorrentID BitTorrent::TorrentID::fromString(const QString &hashString)
|
||||
{
|
||||
return m_hashString;
|
||||
return {BaseType::fromString(hashString)};
|
||||
}
|
||||
|
||||
bool BitTorrent::operator==(const InfoHash &left, const InfoHash &right)
|
||||
BitTorrent::TorrentID BitTorrent::TorrentID::fromInfoHash(const BitTorrent::InfoHash &infoHash)
|
||||
{
|
||||
return (static_cast<lt::sha1_hash>(left)
|
||||
== static_cast<lt::sha1_hash>(right));
|
||||
return infoHash.toTorrentID();
|
||||
}
|
||||
|
||||
bool BitTorrent::operator!=(const InfoHash &left, const InfoHash &right)
|
||||
uint BitTorrent::qHash(const BitTorrent::TorrentID &key, const uint seed)
|
||||
{
|
||||
return ::qHash(std::hash<TorrentID::UnderlyingType>()(key), seed);
|
||||
}
|
||||
|
||||
bool BitTorrent::operator==(const BitTorrent::InfoHash &left, const BitTorrent::InfoHash &right)
|
||||
{
|
||||
return (static_cast<InfoHash::WrappedType>(left) == static_cast<InfoHash::WrappedType>(right));
|
||||
}
|
||||
|
||||
bool BitTorrent::operator!=(const BitTorrent::InfoHash &left, const BitTorrent::InfoHash &right)
|
||||
{
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
bool BitTorrent::operator<(const InfoHash &left, const InfoHash &right)
|
||||
{
|
||||
return static_cast<lt::sha1_hash>(left) < static_cast<lt::sha1_hash>(right);
|
||||
}
|
||||
|
||||
uint BitTorrent::qHash(const InfoHash &key, const uint seed)
|
||||
{
|
||||
return ::qHash((std::hash<lt::sha1_hash> {})(key), seed);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2015, 2021 Vladimir Golovnev <glassez@yandex.ru>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -28,41 +28,60 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <libtorrent/sha1_hash.hpp>
|
||||
#include <libtorrent/version.hpp>
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
#include <libtorrent/info_hash.hpp>
|
||||
#endif
|
||||
|
||||
#include <QHash>
|
||||
#include <QMetaType>
|
||||
#include <QString>
|
||||
|
||||
#include "base/digest32.h"
|
||||
|
||||
using SHA1Hash = Digest32<160>;
|
||||
using SHA256Hash = Digest32<256>;
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
class InfoHash;
|
||||
|
||||
class TorrentID : public Digest32<160>
|
||||
{
|
||||
public:
|
||||
using BaseType = Digest32<160>;
|
||||
using BaseType::BaseType;
|
||||
|
||||
static TorrentID fromString(const QString &hashString);
|
||||
static TorrentID fromInfoHash(const InfoHash &infoHash);
|
||||
};
|
||||
|
||||
class InfoHash
|
||||
{
|
||||
public:
|
||||
InfoHash() = default;
|
||||
InfoHash(const lt::sha1_hash &nativeHash);
|
||||
InfoHash(const QString &hashString);
|
||||
InfoHash(const InfoHash &other) = default;
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
using WrappedType = lt::info_hash_t;
|
||||
#else
|
||||
using WrappedType = lt::sha1_hash;
|
||||
#endif
|
||||
|
||||
static constexpr int length()
|
||||
{
|
||||
return lt::sha1_hash::size();
|
||||
}
|
||||
InfoHash() = default;
|
||||
InfoHash(const InfoHash &other) = default;
|
||||
InfoHash(const WrappedType &nativeHash);
|
||||
|
||||
bool isValid() const;
|
||||
TorrentID toTorrentID() const;
|
||||
|
||||
operator lt::sha1_hash() const;
|
||||
operator QString() const;
|
||||
operator WrappedType() const;
|
||||
|
||||
private:
|
||||
bool m_valid = false;
|
||||
lt::sha1_hash m_nativeHash;
|
||||
QString m_hashString;
|
||||
WrappedType m_nativeHash;
|
||||
};
|
||||
|
||||
uint qHash(const TorrentID &key, uint seed);
|
||||
|
||||
bool operator==(const InfoHash &left, const InfoHash &right);
|
||||
bool operator!=(const InfoHash &left, const InfoHash &right);
|
||||
bool operator<(const InfoHash &left, const InfoHash &right);
|
||||
uint qHash(const InfoHash &key, uint seed);
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(BitTorrent::InfoHash)
|
||||
Q_DECLARE_METATYPE(BitTorrent::TorrentID)
|
||||
|
||||
@@ -40,15 +40,15 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
bool isBitTorrentInfoHash(const QString &string)
|
||||
bool isSHA1Hash(const QString &string)
|
||||
{
|
||||
// There are 2 representations for BitTorrent info hash:
|
||||
// 1. 40 chars hex-encoded string
|
||||
// == 20 (SHA-1 length in bytes) * 2 (each byte maps to 2 hex characters)
|
||||
// 2. 32 chars Base32 encoded string
|
||||
// == 20 (SHA-1 length in bytes) * 1.6 (the efficiency of Base32 encoding)
|
||||
const int SHA1_HEX_SIZE = BitTorrent::InfoHash::length() * 2;
|
||||
const int SHA1_BASE32_SIZE = BitTorrent::InfoHash::length() * 1.6;
|
||||
const int SHA1_HEX_SIZE = SHA1Hash::length() * 2;
|
||||
const int SHA1_BASE32_SIZE = SHA1Hash::length() * 1.6;
|
||||
|
||||
return ((((string.size() == SHA1_HEX_SIZE))
|
||||
&& !string.contains(QRegularExpression(QLatin1String("[^0-9A-Fa-f]"))))
|
||||
@@ -65,7 +65,7 @@ MagnetUri::MagnetUri(const QString &source)
|
||||
{
|
||||
if (source.isEmpty()) return;
|
||||
|
||||
if (isBitTorrentInfoHash(source))
|
||||
if (isSHA1Hash(source))
|
||||
m_url = QLatin1String("magnet:?xt=urn:btih:") + source;
|
||||
|
||||
lt::error_code ec;
|
||||
@@ -73,12 +73,18 @@ MagnetUri::MagnetUri(const QString &source)
|
||||
if (ec) return;
|
||||
|
||||
m_valid = true;
|
||||
m_hash = m_addTorrentParams.info_hash;
|
||||
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
m_infoHash = m_addTorrentParams.info_hashes;
|
||||
#else
|
||||
m_infoHash = m_addTorrentParams.info_hash;
|
||||
#endif
|
||||
|
||||
m_name = QString::fromStdString(m_addTorrentParams.name);
|
||||
|
||||
m_trackers.reserve(m_addTorrentParams.trackers.size());
|
||||
for (const std::string &tracker : m_addTorrentParams.trackers)
|
||||
m_trackers.append(lt::announce_entry {tracker});
|
||||
m_trackers.append({QString::fromStdString(tracker)});
|
||||
|
||||
m_urlSeeds.reserve(m_addTorrentParams.url_seeds.size());
|
||||
for (const std::string &urlSeed : m_addTorrentParams.url_seeds)
|
||||
@@ -90,9 +96,9 @@ bool MagnetUri::isValid() const
|
||||
return m_valid;
|
||||
}
|
||||
|
||||
InfoHash MagnetUri::hash() const
|
||||
InfoHash MagnetUri::infoHash() const
|
||||
{
|
||||
return m_hash;
|
||||
return m_infoHash;
|
||||
}
|
||||
|
||||
QString MagnetUri::name() const
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace BitTorrent
|
||||
explicit MagnetUri(const QString &source = {});
|
||||
|
||||
bool isValid() const;
|
||||
InfoHash hash() const;
|
||||
InfoHash infoHash() const;
|
||||
QString name() const;
|
||||
QVector<TrackerEntry> trackers() const;
|
||||
QVector<QUrl> urlSeeds() const;
|
||||
@@ -57,7 +57,7 @@ namespace BitTorrent
|
||||
private:
|
||||
bool m_valid;
|
||||
QString m_url;
|
||||
InfoHash m_hash;
|
||||
InfoHash m_infoHash;
|
||||
QString m_name;
|
||||
QVector<TrackerEntry> m_trackers;
|
||||
QVector<QUrl> m_urlSeeds;
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <libtorrent/alert_types.hpp>
|
||||
#include <libtorrent/bdecode.hpp>
|
||||
#include <libtorrent/bencode.hpp>
|
||||
#include <libtorrent/entry.hpp>
|
||||
#include <libtorrent/error_code.hpp>
|
||||
#include <libtorrent/extensions/smart_ban.hpp>
|
||||
#include <libtorrent/extensions/ut_metadata.hpp>
|
||||
@@ -55,6 +56,7 @@
|
||||
#include <libtorrent/session_stats.hpp>
|
||||
#include <libtorrent/session_status.hpp>
|
||||
#include <libtorrent/torrent_info.hpp>
|
||||
#include <libtorrent/write_resume_data.hpp>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
@@ -303,6 +305,17 @@ namespace
|
||||
};
|
||||
}
|
||||
|
||||
using ListType = lt::entry::list_type;
|
||||
|
||||
ListType setToEntryList(const QSet<QString> &input)
|
||||
{
|
||||
ListType entryList;
|
||||
entryList.reserve(input.size());
|
||||
for (const QString &setValue : input)
|
||||
entryList.emplace_back(setValue.toStdString());
|
||||
return entryList;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QString convertIfaceNameToGuid(const QString &name)
|
||||
{
|
||||
@@ -372,6 +385,7 @@ Session::Session(QObject *parent)
|
||||
, m_outgoingPortsMin(BITTORRENT_SESSION_KEY("OutgoingPortsMin"), 0)
|
||||
, m_outgoingPortsMax(BITTORRENT_SESSION_KEY("OutgoingPortsMax"), 0)
|
||||
, m_UPnPLeaseDuration(BITTORRENT_SESSION_KEY("UPnPLeaseDuration"), 0)
|
||||
, m_peerToS(BITTORRENT_SESSION_KEY("PeerToS"), 0x20)
|
||||
, m_ignoreLimitsOnLAN(BITTORRENT_SESSION_KEY("IgnoreLimitsOnLAN"), false)
|
||||
, m_includeOverheadInLimits(BITTORRENT_SESSION_KEY("IncludeOverheadInLimits"), false)
|
||||
, m_announceIP(BITTORRENT_SESSION_KEY("AnnounceIP"))
|
||||
@@ -388,7 +402,7 @@ Session::Session(QObject *parent)
|
||||
, clampValue(MixedModeAlgorithm::TCP, MixedModeAlgorithm::Proportional))
|
||||
, m_IDNSupportEnabled(BITTORRENT_SESSION_KEY("IDNSupportEnabled"), false)
|
||||
, m_multiConnectionsPerIpEnabled(BITTORRENT_SESSION_KEY("MultiConnectionsPerIp"), false)
|
||||
, m_validateHTTPSTrackerCertificate(BITTORRENT_SESSION_KEY("ValidateHTTPSTrackerCertificate"), false)
|
||||
, m_validateHTTPSTrackerCertificate(BITTORRENT_SESSION_KEY("ValidateHTTPSTrackerCertificate"), true)
|
||||
, m_blockPeersOnPrivilegedPorts(BITTORRENT_SESSION_KEY("BlockPeersOnPrivilegedPorts"), false)
|
||||
, m_isAddTrackersEnabled(BITTORRENT_SESSION_KEY("AddTrackersEnabled"), false)
|
||||
, m_additionalTrackers(BITTORRENT_SESSION_KEY("AdditionalTrackers"))
|
||||
@@ -1110,11 +1124,7 @@ void Session::initializeNativeSession()
|
||||
|
||||
m_nativeSession->set_alert_notify([this]()
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
QMetaObject::invokeMethod(this, &Session::readAlerts, Qt::QueuedConnection);
|
||||
#else
|
||||
QMetaObject::invokeMethod(this, "readAlerts", Qt::QueuedConnection);
|
||||
#endif
|
||||
});
|
||||
|
||||
// Enabling plugins
|
||||
@@ -1335,9 +1345,10 @@ void Session::loadLTSettings(lt::settings_pack &settingsPack)
|
||||
// Outgoing ports
|
||||
settingsPack.set_int(lt::settings_pack::outgoing_port, outgoingPortsMin());
|
||||
settingsPack.set_int(lt::settings_pack::num_outgoing_ports, outgoingPortsMax() - outgoingPortsMin() + 1);
|
||||
|
||||
// UPnP lease duration
|
||||
settingsPack.set_int(lt::settings_pack::upnp_lease_duration, UPnPLeaseDuration());
|
||||
|
||||
// Type of service
|
||||
settingsPack.set_int(lt::settings_pack::peer_tos, peerToS());
|
||||
// Include overhead in transfer limits
|
||||
settingsPack.set_bool(lt::settings_pack::rate_limit_ip_overhead, includeOverheadInLimits());
|
||||
// IP address to announce to trackers
|
||||
@@ -1387,15 +1398,11 @@ void Session::loadLTSettings(lt::settings_pack &settingsPack)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef HAS_IDN_SUPPORT
|
||||
settingsPack.set_bool(lt::settings_pack::allow_idna, isIDNSupportEnabled());
|
||||
#endif
|
||||
|
||||
settingsPack.set_bool(lt::settings_pack::allow_multiple_connections_per_ip, multiConnectionsPerIpEnabled());
|
||||
|
||||
#ifdef HAS_HTTPS_TRACKER_VALIDATION
|
||||
settingsPack.set_bool(lt::settings_pack::validate_https_trackers, validateHTTPSTrackerCertificate());
|
||||
#endif
|
||||
|
||||
settingsPack.set_bool(lt::settings_pack::no_connect_privileged_ports, blockPeersOnPrivilegedPorts());
|
||||
|
||||
@@ -1450,12 +1457,14 @@ void Session::configureNetworkInterfaces(lt::settings_pack &settingsPack)
|
||||
const QHostAddress addr {ip};
|
||||
if (!addr.isNull())
|
||||
{
|
||||
const QString ip = ((addr.protocol() == QAbstractSocket::IPv6Protocol)
|
||||
? ('[' + Utils::Net::canonicalIPv6Addr(addr).toString() + ']')
|
||||
: addr.toString());
|
||||
endpoints << (ip + portString);
|
||||
const bool isIPv6 = (addr.protocol() == QAbstractSocket::IPv6Protocol);
|
||||
const QString ip = isIPv6
|
||||
? Utils::Net::canonicalIPv6Addr(addr).toString()
|
||||
: addr.toString();
|
||||
|
||||
if ((ip != "0.0.0.0") && (ip != "[::]"))
|
||||
endpoints << ((isIPv6 ? ('[' + ip + ']') : ip) + portString);
|
||||
|
||||
if ((ip != QLatin1String("0.0.0.0")) && (ip != QLatin1String("::")))
|
||||
outgoingInterfaces << ip;
|
||||
}
|
||||
else
|
||||
@@ -1608,7 +1617,7 @@ void Session::populateAdditionalTrackers()
|
||||
{
|
||||
tracker = tracker.trimmed();
|
||||
if (!tracker.isEmpty())
|
||||
m_additionalTrackerList << tracker.toString();
|
||||
m_additionalTrackerList.append({tracker.toString()});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1618,7 +1627,7 @@ void Session::processShareLimits()
|
||||
|
||||
// We shouldn't iterate over `m_torrents` in the loop below
|
||||
// since `deleteTorrent()` modifies it indirectly
|
||||
const QHash<InfoHash, TorrentImpl *> torrents {m_torrents};
|
||||
const QHash<TorrentID, TorrentImpl *> torrents {m_torrents};
|
||||
for (TorrentImpl *const torrent : torrents)
|
||||
{
|
||||
if (torrent->isSeed() && !torrent->isForced())
|
||||
@@ -1640,12 +1649,12 @@ void Session::processShareLimits()
|
||||
if (m_maxRatioAction == Remove)
|
||||
{
|
||||
LogMsg(tr("'%1' reached the maximum ratio you set. Removed.").arg(torrent->name()));
|
||||
deleteTorrent(torrent->hash());
|
||||
deleteTorrent(torrent->id());
|
||||
}
|
||||
else if (m_maxRatioAction == DeleteFiles)
|
||||
{
|
||||
LogMsg(tr("'%1' reached the maximum ratio you set. Removed torrent and its files.").arg(torrent->name()));
|
||||
deleteTorrent(torrent->hash(), DeleteTorrentAndFiles);
|
||||
deleteTorrent(torrent->id(), DeleteTorrentAndFiles);
|
||||
}
|
||||
else if ((m_maxRatioAction == Pause) && !torrent->isPaused())
|
||||
{
|
||||
@@ -1679,12 +1688,12 @@ void Session::processShareLimits()
|
||||
if (m_maxRatioAction == Remove)
|
||||
{
|
||||
LogMsg(tr("'%1' reached the maximum seeding time you set. Removed.").arg(torrent->name()));
|
||||
deleteTorrent(torrent->hash());
|
||||
deleteTorrent(torrent->id());
|
||||
}
|
||||
else if (m_maxRatioAction == DeleteFiles)
|
||||
{
|
||||
LogMsg(tr("'%1' reached the maximum seeding time you set. Removed torrent and its files.").arg(torrent->name()));
|
||||
deleteTorrent(torrent->hash(), DeleteTorrentAndFiles);
|
||||
deleteTorrent(torrent->id(), DeleteTorrentAndFiles);
|
||||
}
|
||||
else if ((m_maxRatioAction == Pause) && !torrent->isPaused())
|
||||
{
|
||||
@@ -1721,7 +1730,7 @@ void Session::handleDownloadFinished(const Net::DownloadResult &result)
|
||||
}
|
||||
}
|
||||
|
||||
void Session::fileSearchFinished(const InfoHash &id, const QString &savePath, const QStringList &fileNames)
|
||||
void Session::fileSearchFinished(const TorrentID &id, const QString &savePath, const QStringList &fileNames)
|
||||
{
|
||||
TorrentImpl *torrent = m_torrents.value(id);
|
||||
if (torrent)
|
||||
@@ -1747,9 +1756,9 @@ void Session::fileSearchFinished(const InfoHash &id, const QString &savePath, co
|
||||
}
|
||||
|
||||
// Return the torrent handle, given its hash
|
||||
Torrent *Session::findTorrent(const InfoHash &hash) const
|
||||
Torrent *Session::findTorrent(const TorrentID &id) const
|
||||
{
|
||||
return m_torrents.value(hash);
|
||||
return m_torrents.value(id);
|
||||
}
|
||||
|
||||
bool Session::hasActiveTorrents() const
|
||||
@@ -1764,7 +1773,7 @@ bool Session::hasUnfinishedTorrents() const
|
||||
{
|
||||
return std::any_of(m_torrents.begin(), m_torrents.end(), [](const TorrentImpl *torrent)
|
||||
{
|
||||
return (!torrent->isSeed() && !torrent->isPaused());
|
||||
return (!torrent->isSeed() && !torrent->isPaused() && !torrent->isErrored());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1797,18 +1806,18 @@ void Session::banIP(const QString &ip)
|
||||
|
||||
// Delete a torrent from the session, given its hash
|
||||
// and from the disk, if the corresponding deleteOption is chosen
|
||||
bool Session::deleteTorrent(const InfoHash &hash, const DeleteOption deleteOption)
|
||||
bool Session::deleteTorrent(const TorrentID &id, const DeleteOption deleteOption)
|
||||
{
|
||||
TorrentImpl *const torrent = m_torrents.take(hash);
|
||||
TorrentImpl *const torrent = m_torrents.take(id);
|
||||
if (!torrent) return false;
|
||||
|
||||
qDebug("Deleting torrent with hash: %s", qUtf8Printable(torrent->hash()));
|
||||
qDebug("Deleting torrent with ID: %s", qUtf8Printable(torrent->id().toString()));
|
||||
emit torrentAboutToBeRemoved(torrent);
|
||||
|
||||
// Remove it from session
|
||||
if (deleteOption == DeleteTorrent)
|
||||
{
|
||||
m_removingTorrents[torrent->hash()] = {torrent->name(), "", deleteOption};
|
||||
m_removingTorrents[torrent->id()] = {torrent->name(), "", deleteOption};
|
||||
|
||||
const lt::torrent_handle nativeHandle {torrent->nativeHandle()};
|
||||
const auto iter = std::find_if(m_moveStorageQueue.begin(), m_moveStorageQueue.end()
|
||||
@@ -1837,7 +1846,7 @@ bool Session::deleteTorrent(const InfoHash &hash, const DeleteOption deleteOptio
|
||||
rootPath = torrent->actualStorageLocation();
|
||||
}
|
||||
|
||||
m_removingTorrents[torrent->hash()] = {torrent->name(), rootPath, deleteOption};
|
||||
m_removingTorrents[torrent->id()] = {torrent->name(), rootPath, deleteOption};
|
||||
|
||||
if (m_moveStorageQueue.size() > 1)
|
||||
{
|
||||
@@ -1856,48 +1865,44 @@ bool Session::deleteTorrent(const InfoHash &hash, const DeleteOption deleteOptio
|
||||
}
|
||||
|
||||
// Remove it from torrent resume directory
|
||||
const QString resumedataFile = QString::fromLatin1("%1.fastresume").arg(torrent->hash());
|
||||
const QString metadataFile = QString::fromLatin1("%1.torrent").arg(torrent->hash());
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
const QString resumedataFile = QString::fromLatin1("%1.fastresume").arg(torrent->id().toString());
|
||||
const QString metadataFile = QString::fromLatin1("%1.torrent").arg(torrent->id().toString());
|
||||
QMetaObject::invokeMethod(m_resumeDataSavingManager, [this, resumedataFile, metadataFile]()
|
||||
{
|
||||
m_resumeDataSavingManager->remove(resumedataFile);
|
||||
m_resumeDataSavingManager->remove(metadataFile);
|
||||
});
|
||||
#else
|
||||
QMetaObject::invokeMethod(m_resumeDataSavingManager, "remove", Q_ARG(QString, resumedataFile));
|
||||
QMetaObject::invokeMethod(m_resumeDataSavingManager, "remove", Q_ARG(QString, metadataFile));
|
||||
#endif
|
||||
|
||||
delete torrent;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Session::cancelDownloadMetadata(const InfoHash &hash)
|
||||
bool Session::cancelDownloadMetadata(const TorrentID &id)
|
||||
{
|
||||
const auto downloadedMetadataIter = m_downloadedMetadata.find(hash);
|
||||
const auto downloadedMetadataIter = m_downloadedMetadata.find(id);
|
||||
if (downloadedMetadataIter == m_downloadedMetadata.end()) return false;
|
||||
|
||||
m_downloadedMetadata.erase(downloadedMetadataIter);
|
||||
--m_extraLimit;
|
||||
adjustLimits();
|
||||
m_nativeSession->remove_torrent(m_nativeSession->find_torrent(hash), lt::session::delete_files);
|
||||
m_nativeSession->remove_torrent(m_nativeSession->find_torrent(id), lt::session::delete_files);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Session::increaseTorrentsQueuePos(const QVector<InfoHash> &hashes)
|
||||
void Session::increaseTorrentsQueuePos(const QVector<TorrentID> &ids)
|
||||
{
|
||||
using ElementType = std::pair<int, TorrentImpl *>;
|
||||
using ElementType = std::pair<int, const TorrentImpl *>;
|
||||
std::priority_queue<ElementType
|
||||
, std::vector<ElementType>
|
||||
, std::greater<ElementType>> torrentQueue;
|
||||
|
||||
// Sort torrents by queue position
|
||||
for (const InfoHash &infoHash : hashes)
|
||||
for (const TorrentID &id : ids)
|
||||
{
|
||||
TorrentImpl *const torrent = m_torrents.value(infoHash);
|
||||
if (torrent && !torrent->isSeed())
|
||||
torrentQueue.emplace(torrent->queuePosition(), torrent);
|
||||
const TorrentImpl *torrent = m_torrents.value(id);
|
||||
if (!torrent) continue;
|
||||
if (const int position = torrent->queuePosition(); position >= 0)
|
||||
torrentQueue.emplace(position, torrent);
|
||||
}
|
||||
|
||||
// Increase torrents queue position (starting with the one in the highest queue position)
|
||||
@@ -1911,17 +1916,18 @@ void Session::increaseTorrentsQueuePos(const QVector<InfoHash> &hashes)
|
||||
saveTorrentsQueue();
|
||||
}
|
||||
|
||||
void Session::decreaseTorrentsQueuePos(const QVector<InfoHash> &hashes)
|
||||
void Session::decreaseTorrentsQueuePos(const QVector<TorrentID> &ids)
|
||||
{
|
||||
using ElementType = std::pair<int, TorrentImpl *>;
|
||||
using ElementType = std::pair<int, const TorrentImpl *>;
|
||||
std::priority_queue<ElementType> torrentQueue;
|
||||
|
||||
// Sort torrents by queue position
|
||||
for (const InfoHash &infoHash : hashes)
|
||||
for (const TorrentID &id : ids)
|
||||
{
|
||||
TorrentImpl *const torrent = m_torrents.value(infoHash);
|
||||
if (torrent && !torrent->isSeed())
|
||||
torrentQueue.emplace(torrent->queuePosition(), torrent);
|
||||
const TorrentImpl *torrent = m_torrents.value(id);
|
||||
if (!torrent) continue;
|
||||
if (const int position = torrent->queuePosition(); position >= 0)
|
||||
torrentQueue.emplace(position, torrent);
|
||||
}
|
||||
|
||||
// Decrease torrents queue position (starting with the one in the lowest queue position)
|
||||
@@ -1938,17 +1944,18 @@ void Session::decreaseTorrentsQueuePos(const QVector<InfoHash> &hashes)
|
||||
saveTorrentsQueue();
|
||||
}
|
||||
|
||||
void Session::topTorrentsQueuePos(const QVector<InfoHash> &hashes)
|
||||
void Session::topTorrentsQueuePos(const QVector<TorrentID> &ids)
|
||||
{
|
||||
using ElementType = std::pair<int, TorrentImpl *>;
|
||||
using ElementType = std::pair<int, const TorrentImpl *>;
|
||||
std::priority_queue<ElementType> torrentQueue;
|
||||
|
||||
// Sort torrents by queue position
|
||||
for (const InfoHash &infoHash : hashes)
|
||||
for (const TorrentID &id : ids)
|
||||
{
|
||||
TorrentImpl *const torrent = m_torrents.value(infoHash);
|
||||
if (torrent && !torrent->isSeed())
|
||||
torrentQueue.emplace(torrent->queuePosition(), torrent);
|
||||
const TorrentImpl *torrent = m_torrents.value(id);
|
||||
if (!torrent) continue;
|
||||
if (const int position = torrent->queuePosition(); position >= 0)
|
||||
torrentQueue.emplace(position, torrent);
|
||||
}
|
||||
|
||||
// Top torrents queue position (starting with the one in the lowest queue position)
|
||||
@@ -1962,19 +1969,20 @@ void Session::topTorrentsQueuePos(const QVector<InfoHash> &hashes)
|
||||
saveTorrentsQueue();
|
||||
}
|
||||
|
||||
void Session::bottomTorrentsQueuePos(const QVector<InfoHash> &hashes)
|
||||
void Session::bottomTorrentsQueuePos(const QVector<TorrentID> &ids)
|
||||
{
|
||||
using ElementType = std::pair<int, TorrentImpl *>;
|
||||
using ElementType = std::pair<int, const TorrentImpl *>;
|
||||
std::priority_queue<ElementType
|
||||
, std::vector<ElementType>
|
||||
, std::greater<ElementType>> torrentQueue;
|
||||
|
||||
// Sort torrents by queue position
|
||||
for (const InfoHash &infoHash : hashes)
|
||||
for (const TorrentID &id : ids)
|
||||
{
|
||||
TorrentImpl *const torrent = m_torrents.value(infoHash);
|
||||
if (torrent && !torrent->isSeed())
|
||||
torrentQueue.emplace(torrent->queuePosition(), torrent);
|
||||
const TorrentImpl *torrent = m_torrents.value(id);
|
||||
if (!torrent) continue;
|
||||
if (const int position = torrent->queuePosition(); position >= 0)
|
||||
torrentQueue.emplace(position, torrent);
|
||||
}
|
||||
|
||||
// Bottom torrents queue position (starting with the one in the highest queue position)
|
||||
@@ -1991,6 +1999,25 @@ void Session::bottomTorrentsQueuePos(const QVector<InfoHash> &hashes)
|
||||
saveTorrentsQueue();
|
||||
}
|
||||
|
||||
void Session::handleTorrentNeedSaveResumeData(const TorrentImpl *torrent)
|
||||
{
|
||||
if (m_needSaveResumeDataTorrents.empty())
|
||||
{
|
||||
QMetaObject::invokeMethod(this, [this]()
|
||||
{
|
||||
for (const TorrentID &torrentID : asConst(m_needSaveResumeDataTorrents))
|
||||
{
|
||||
TorrentImpl *torrent = m_torrents.value(torrentID);
|
||||
if (torrent)
|
||||
torrent->saveResumeData();
|
||||
}
|
||||
m_needSaveResumeDataTorrents.clear();
|
||||
}, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
m_needSaveResumeDataTorrents.insert(torrent->id());
|
||||
}
|
||||
|
||||
void Session::handleTorrentSaveResumeDataRequested(const TorrentImpl *torrent)
|
||||
{
|
||||
qDebug("Saving resume data is requested for torrent '%s'...", qUtf8Printable(torrent->name()));
|
||||
@@ -2086,20 +2113,20 @@ bool Session::addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &source
|
||||
const bool hasMetadata = std::holds_alternative<TorrentInfo>(source);
|
||||
TorrentInfo metadata = (hasMetadata ? std::get<TorrentInfo>(source) : TorrentInfo {});
|
||||
const MagnetUri &magnetUri = (hasMetadata ? MagnetUri {} : std::get<MagnetUri>(source));
|
||||
const InfoHash hash = (hasMetadata ? metadata.hash() : magnetUri.hash());
|
||||
const auto id = TorrentID::fromInfoHash(hasMetadata ? metadata.infoHash() : magnetUri.infoHash());
|
||||
|
||||
// It looks illogical that we don't just use an existing handle,
|
||||
// but as previous experience has shown, it actually creates unnecessary
|
||||
// problems and unwanted behavior due to the fact that it was originally
|
||||
// added with parameters other than those provided by the user.
|
||||
cancelDownloadMetadata(hash);
|
||||
cancelDownloadMetadata(id);
|
||||
|
||||
// We should not add the torrent if it is already
|
||||
// processed or is pending to add to session
|
||||
if (m_loadingTorrents.contains(hash))
|
||||
if (m_loadingTorrents.contains(id))
|
||||
return false;
|
||||
|
||||
TorrentImpl *const torrent = m_torrents.value(hash);
|
||||
TorrentImpl *const torrent = m_torrents.value(id);
|
||||
if (torrent)
|
||||
{ // a duplicate torrent is added
|
||||
if (torrent->isPrivate() || (hasMetadata && metadata.isPrivate()))
|
||||
@@ -2190,7 +2217,7 @@ bool Session::addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &source
|
||||
if (!isFindingIncompleteFiles)
|
||||
return loadTorrent(loadTorrentParams);
|
||||
|
||||
m_loadingTorrents.insert(hash, loadTorrentParams);
|
||||
m_loadingTorrents.insert(id, loadTorrentParams);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2207,8 +2234,12 @@ bool Session::loadTorrent(LoadTorrentParams params)
|
||||
p.max_uploads = maxUploadsPerTorrent();
|
||||
|
||||
const bool hasMetadata = (p.ti && p.ti->is_valid());
|
||||
const InfoHash hash = (hasMetadata ? p.ti->info_hash() : p.info_hash);
|
||||
m_loadingTorrents.insert(hash, params);
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
const auto id = TorrentID::fromInfoHash(hasMetadata ? p.ti->info_hashes() : p.info_hashes);
|
||||
#else
|
||||
const auto id = TorrentID::fromInfoHash(hasMetadata ? p.ti->info_hash() : p.info_hash);
|
||||
#endif
|
||||
m_loadingTorrents.insert(id, params);
|
||||
|
||||
// Adding torrent to BitTorrent session
|
||||
m_nativeSession->async_add_torrent(p);
|
||||
@@ -2218,20 +2249,14 @@ bool Session::loadTorrent(LoadTorrentParams params)
|
||||
|
||||
void Session::findIncompleteFiles(const TorrentInfo &torrentInfo, const QString &savePath) const
|
||||
{
|
||||
const InfoHash searchId = torrentInfo.hash();
|
||||
const auto searchId = TorrentID::fromInfoHash(torrentInfo.infoHash());
|
||||
const QStringList originalFileNames = torrentInfo.filePaths();
|
||||
const QString completeSavePath = savePath;
|
||||
const QString incompleteSavePath = (isTempPathEnabled() ? torrentTempPath(torrentInfo) : QString {});
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
QMetaObject::invokeMethod(m_fileSearcher, [=]()
|
||||
{
|
||||
m_fileSearcher->search(searchId, originalFileNames, completeSavePath, incompleteSavePath);
|
||||
});
|
||||
#else
|
||||
QMetaObject::invokeMethod(m_fileSearcher, "search"
|
||||
, Q_ARG(BitTorrent::InfoHash, searchId), Q_ARG(QStringList, originalFileNames)
|
||||
, Q_ARG(QString, completeSavePath), Q_ARG(QString, incompleteSavePath));
|
||||
#endif
|
||||
}
|
||||
|
||||
// Add a torrent to libtorrent session in hidden mode
|
||||
@@ -2240,17 +2265,17 @@ bool Session::downloadMetadata(const MagnetUri &magnetUri)
|
||||
{
|
||||
if (!magnetUri.isValid()) return false;
|
||||
|
||||
const InfoHash hash = magnetUri.hash();
|
||||
const auto id = TorrentID::fromInfoHash(magnetUri.infoHash());
|
||||
const QString name = magnetUri.name();
|
||||
|
||||
// We should not add torrent if it's already
|
||||
// processed or adding to session
|
||||
if (m_torrents.contains(hash)) return false;
|
||||
if (m_loadingTorrents.contains(hash)) return false;
|
||||
if (m_downloadedMetadata.contains(hash)) return false;
|
||||
if (m_torrents.contains(id)) return false;
|
||||
if (m_loadingTorrents.contains(id)) return false;
|
||||
if (m_downloadedMetadata.contains(id)) return false;
|
||||
|
||||
qDebug("Adding torrent to preload metadata...");
|
||||
qDebug(" -> Hash: %s", qUtf8Printable(hash));
|
||||
qDebug(" -> Torrent ID: %s", qUtf8Printable(id.toString()));
|
||||
qDebug(" -> Name: %s", qUtf8Printable(name));
|
||||
|
||||
lt::add_torrent_params p = magnetUri.addTorrentParams();
|
||||
@@ -2266,7 +2291,7 @@ bool Session::downloadMetadata(const MagnetUri &magnetUri)
|
||||
p.max_connections = maxConnectionsPerTorrent();
|
||||
p.max_uploads = maxUploadsPerTorrent();
|
||||
|
||||
const QString savePath = Utils::Fs::tempPath() + static_cast<QString>(hash);
|
||||
const QString savePath = Utils::Fs::tempPath() + id.toString();
|
||||
p.save_path = Utils::Fs::toNativePath(savePath).toStdString();
|
||||
|
||||
// Forced start
|
||||
@@ -2299,7 +2324,7 @@ void Session::exportTorrentFile(const Torrent *torrent, TorrentExportFolder fold
|
||||
((folder == TorrentExportFolder::Finished) && !finishedTorrentExportDirectory().isEmpty()));
|
||||
|
||||
const QString validName = Utils::Fs::toValidFileSystemName(torrent->name());
|
||||
const QString torrentFilename = QString::fromLatin1("%1.torrent").arg(torrent->hash());
|
||||
const QString torrentFilename = QString::fromLatin1("%1.torrent").arg(torrent->id().toString());
|
||||
QString torrentExportFilename = QString::fromLatin1("%1.torrent").arg(validName);
|
||||
const QString torrentPath = QDir(m_resumeFolderPath).absoluteFilePath(torrentFilename);
|
||||
const QDir exportPath(folder == TorrentExportFolder::Regular ? torrentExportDirectory() : finishedTorrentExportDirectory());
|
||||
@@ -2326,7 +2351,10 @@ void Session::generateResumeData()
|
||||
if (!torrent->isValid()) continue;
|
||||
|
||||
if (torrent->needSaveResumeData())
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
m_needSaveResumeDataTorrents.remove(torrent->id());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2363,7 +2391,7 @@ void Session::saveResumeData()
|
||||
}
|
||||
}
|
||||
|
||||
void Session::saveTorrentsQueue()
|
||||
void Session::saveTorrentsQueue() const
|
||||
{
|
||||
// store hash in textual representation
|
||||
QMap<int, QString> queue; // Use QMap since it should be ordered by key
|
||||
@@ -2372,33 +2400,24 @@ void Session::saveTorrentsQueue()
|
||||
// We require actual (non-cached) queue position here!
|
||||
const int queuePos = static_cast<LTUnderlyingType<lt::queue_position_t>>(torrent->nativeHandle().queue_position());
|
||||
if (queuePos >= 0)
|
||||
queue[queuePos] = torrent->hash();
|
||||
queue[queuePos] = torrent->id().toString();
|
||||
}
|
||||
|
||||
QByteArray data;
|
||||
data.reserve(((InfoHash::length() * 2) + 1) * queue.size());
|
||||
for (const QString &hash : asConst(queue))
|
||||
data += (hash.toLatin1() + '\n');
|
||||
data.reserve(((TorrentID::length() * 2) + 1) * queue.size());
|
||||
for (const QString &torrentID : asConst(queue))
|
||||
data += (torrentID.toLatin1() + '\n');
|
||||
|
||||
const QString filename = QLatin1String {"queue"};
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
QMetaObject::invokeMethod(m_resumeDataSavingManager
|
||||
, [this, data, filename]() { m_resumeDataSavingManager->save(filename, data); });
|
||||
#else
|
||||
QMetaObject::invokeMethod(m_resumeDataSavingManager, "save"
|
||||
, Q_ARG(QString, filename), Q_ARG(QByteArray, data));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Session::removeTorrentsQueue()
|
||||
void Session::removeTorrentsQueue() const
|
||||
{
|
||||
const QString filename = QLatin1String {"queue"};
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
QMetaObject::invokeMethod(m_resumeDataSavingManager
|
||||
, [this, filename]() { m_resumeDataSavingManager->remove(filename); });
|
||||
#else
|
||||
QMetaObject::invokeMethod(m_resumeDataSavingManager, "remove", Q_ARG(QString, filename));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Session::setDefaultSavePath(QString path)
|
||||
@@ -3516,6 +3535,20 @@ void Session::setUPnPLeaseDuration(const int duration)
|
||||
}
|
||||
}
|
||||
|
||||
int Session::peerToS() const
|
||||
{
|
||||
return m_peerToS;
|
||||
}
|
||||
|
||||
void Session::setPeerToS(const int value)
|
||||
{
|
||||
if (value == m_peerToS)
|
||||
return;
|
||||
|
||||
m_peerToS = value;
|
||||
configureDeferred();
|
||||
}
|
||||
|
||||
bool Session::ignoreLimitsOnLAN() const
|
||||
{
|
||||
return m_ignoreLimitsOnLAN;
|
||||
@@ -3742,11 +3775,11 @@ void Session::setMaxRatioAction(const MaxRatioAction act)
|
||||
|
||||
// If this functions returns true, we cannot add torrent to session,
|
||||
// but it is still possible to merge trackers in some cases
|
||||
bool Session::isKnownTorrent(const InfoHash &hash) const
|
||||
bool Session::isKnownTorrent(const TorrentID &id) const
|
||||
{
|
||||
return (m_torrents.contains(hash)
|
||||
|| m_loadingTorrents.contains(hash)
|
||||
|| m_downloadedMetadata.contains(hash));
|
||||
return (m_torrents.contains(id)
|
||||
|| m_loadingTorrents.contains(id)
|
||||
|| m_downloadedMetadata.contains(id));
|
||||
}
|
||||
|
||||
void Session::updateSeedingLimitTimer()
|
||||
@@ -3765,51 +3798,43 @@ void Session::updateSeedingLimitTimer()
|
||||
|
||||
void Session::handleTorrentShareLimitChanged(TorrentImpl *const torrent)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
updateSeedingLimitTimer();
|
||||
}
|
||||
|
||||
void Session::handleTorrentNameChanged(TorrentImpl *const torrent)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
Q_UNUSED(torrent);
|
||||
}
|
||||
|
||||
void Session::handleTorrentSavePathChanged(TorrentImpl *const torrent)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
emit torrentSavePathChanged(torrent);
|
||||
}
|
||||
|
||||
void Session::handleTorrentCategoryChanged(TorrentImpl *const torrent, const QString &oldCategory)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
emit torrentCategoryChanged(torrent, oldCategory);
|
||||
}
|
||||
|
||||
void Session::handleTorrentTagAdded(TorrentImpl *const torrent, const QString &tag)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
emit torrentTagAdded(torrent, tag);
|
||||
}
|
||||
|
||||
void Session::handleTorrentTagRemoved(TorrentImpl *const torrent, const QString &tag)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
emit torrentTagRemoved(torrent, tag);
|
||||
}
|
||||
|
||||
void Session::handleTorrentSavingModeChanged(TorrentImpl *const torrent)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
emit torrentSavingModeChanged(torrent);
|
||||
}
|
||||
|
||||
void Session::handleTorrentTrackersAdded(TorrentImpl *const torrent, const QVector<TrackerEntry> &newTrackers)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
|
||||
for (const TrackerEntry &newTracker : newTrackers)
|
||||
LogMsg(tr("Tracker '%1' was added to torrent '%2'").arg(newTracker.url(), torrent->name()));
|
||||
LogMsg(tr("Tracker '%1' was added to torrent '%2'").arg(newTracker.url, torrent->name()));
|
||||
emit trackersAdded(torrent, newTrackers);
|
||||
if (torrent->trackers().size() == newTrackers.size())
|
||||
emit trackerlessStateChanged(torrent, false);
|
||||
@@ -3818,10 +3843,8 @@ void Session::handleTorrentTrackersAdded(TorrentImpl *const torrent, const QVect
|
||||
|
||||
void Session::handleTorrentTrackersRemoved(TorrentImpl *const torrent, const QVector<TrackerEntry> &deletedTrackers)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
|
||||
for (const TrackerEntry &deletedTracker : deletedTrackers)
|
||||
LogMsg(tr("Tracker '%1' was deleted from torrent '%2'").arg(deletedTracker.url(), torrent->name()));
|
||||
LogMsg(tr("Tracker '%1' was deleted from torrent '%2'").arg(deletedTracker.url, torrent->name()));
|
||||
emit trackersRemoved(torrent, deletedTrackers);
|
||||
if (torrent->trackers().empty())
|
||||
emit trackerlessStateChanged(torrent, true);
|
||||
@@ -3830,20 +3853,17 @@ void Session::handleTorrentTrackersRemoved(TorrentImpl *const torrent, const QVe
|
||||
|
||||
void Session::handleTorrentTrackersChanged(TorrentImpl *const torrent)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
emit trackersChanged(torrent);
|
||||
}
|
||||
|
||||
void Session::handleTorrentUrlSeedsAdded(TorrentImpl *const torrent, const QVector<QUrl> &newUrlSeeds)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
for (const QUrl &newUrlSeed : newUrlSeeds)
|
||||
LogMsg(tr("URL seed '%1' was added to torrent '%2'").arg(newUrlSeed.toString(), torrent->name()));
|
||||
}
|
||||
|
||||
void Session::handleTorrentUrlSeedsRemoved(TorrentImpl *const torrent, const QVector<QUrl> &urlSeeds)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
for (const QUrl &urlSeed : urlSeeds)
|
||||
LogMsg(tr("URL seed '%1' was removed from torrent '%2'").arg(urlSeed.toString(), torrent->name()));
|
||||
}
|
||||
@@ -3852,7 +3872,7 @@ void Session::handleTorrentMetadataReceived(TorrentImpl *const torrent)
|
||||
{
|
||||
// Save metadata
|
||||
const QDir resumeDataDir {m_resumeFolderPath};
|
||||
const QString torrentFileName {QString {"%1.torrent"}.arg(torrent->hash())};
|
||||
const QString torrentFileName {QString {"%1.torrent"}.arg(torrent->id().toString())};
|
||||
try
|
||||
{
|
||||
torrent->info().saveToFile(resumeDataDir.absoluteFilePath(torrentFileName));
|
||||
@@ -3871,13 +3891,11 @@ void Session::handleTorrentMetadataReceived(TorrentImpl *const torrent)
|
||||
|
||||
void Session::handleTorrentPaused(TorrentImpl *const torrent)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
emit torrentPaused(torrent);
|
||||
}
|
||||
|
||||
void Session::handleTorrentResumed(TorrentImpl *const torrent)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
emit torrentResumed(torrent);
|
||||
}
|
||||
|
||||
@@ -3888,8 +3906,6 @@ void Session::handleTorrentChecked(TorrentImpl *const torrent)
|
||||
|
||||
void Session::handleTorrentFinished(TorrentImpl *const torrent)
|
||||
{
|
||||
if (!torrent->hasError() && !torrent->hasMissingFiles())
|
||||
torrent->saveResumeData();
|
||||
emit torrentFinished(torrent);
|
||||
|
||||
qDebug("Checking if the torrent contains torrent files to download");
|
||||
@@ -3925,21 +3941,52 @@ void Session::handleTorrentFinished(TorrentImpl *const torrent)
|
||||
emit allTorrentsFinished();
|
||||
}
|
||||
|
||||
void Session::handleTorrentResumeDataReady(TorrentImpl *const torrent, const std::shared_ptr<lt::entry> &data)
|
||||
void Session::handleTorrentResumeDataReady(TorrentImpl *const torrent, const LoadTorrentParams &data)
|
||||
{
|
||||
--m_numResumeData;
|
||||
|
||||
// We need to adjust native libtorrent resume data
|
||||
lt::add_torrent_params p = data.ltAddTorrentParams;
|
||||
p.save_path = Profile::instance()->toPortablePath(QString::fromStdString(p.save_path)).toStdString();
|
||||
if (data.paused)
|
||||
{
|
||||
p.flags |= lt::torrent_flags::paused;
|
||||
p.flags &= ~lt::torrent_flags::auto_managed;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Torrent can be actually "running" but temporarily "paused" to perform some
|
||||
// service jobs behind the scenes so we need to restore it as "running"
|
||||
if (!data.forced)
|
||||
{
|
||||
p.flags |= lt::torrent_flags::auto_managed;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.flags &= ~lt::torrent_flags::paused;
|
||||
p.flags &= ~lt::torrent_flags::auto_managed;
|
||||
}
|
||||
}
|
||||
|
||||
// Separated thread is used for the blocking IO which results in slow processing of many torrents.
|
||||
// Copying lt::entry objects around isn't cheap.
|
||||
|
||||
const QString filename = QString::fromLatin1("%1.fastresume").arg(torrent->hash());
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
auto resumeDataPtr = std::make_shared<lt::entry>(lt::write_resume_data(p));
|
||||
lt::entry &resumeData = *resumeDataPtr;
|
||||
|
||||
resumeData["qBt-savePath"] = Profile::instance()->toPortablePath(data.savePath).toStdString();
|
||||
resumeData["qBt-ratioLimit"] = static_cast<int>(data.ratioLimit * 1000);
|
||||
resumeData["qBt-seedingTimeLimit"] = data.seedingTimeLimit;
|
||||
resumeData["qBt-category"] = data.category.toStdString();
|
||||
resumeData["qBt-tags"] = setToEntryList(data.tags);
|
||||
resumeData["qBt-name"] = data.name.toStdString();
|
||||
resumeData["qBt-seedStatus"] = data.hasSeedStatus;
|
||||
resumeData["qBt-contentLayout"] = Utils::String::fromEnum(data.contentLayout).toStdString();
|
||||
resumeData["qBt-firstLastPiecePriority"] = data.firstLastPiecePriority;
|
||||
|
||||
const QString filename = QString::fromLatin1("%1.fastresume").arg(torrent->id().toString());
|
||||
QMetaObject::invokeMethod(m_resumeDataSavingManager
|
||||
, [this, filename, data]() { m_resumeDataSavingManager->save(filename, data); });
|
||||
#else
|
||||
QMetaObject::invokeMethod(m_resumeDataSavingManager, "save"
|
||||
, Q_ARG(QString, filename), Q_ARG(std::shared_ptr<lt::entry>, data));
|
||||
#endif
|
||||
, [this, filename, resumeDataPtr]() { m_resumeDataSavingManager->save(filename, resumeDataPtr); });
|
||||
}
|
||||
|
||||
void Session::handleTorrentTrackerReply(TorrentImpl *const torrent, const QString &trackerUrl)
|
||||
@@ -4008,9 +4055,13 @@ bool Session::addMoveTorrentStorageJob(TorrentImpl *torrent, const QString &newP
|
||||
|
||||
void Session::moveTorrentStorage(const MoveStorageJob &job) const
|
||||
{
|
||||
const InfoHash infoHash = job.torrentHandle.info_hash();
|
||||
const TorrentImpl *torrent = m_torrents.value(infoHash);
|
||||
const QString torrentName = (torrent ? torrent->name() : QString {infoHash});
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
const auto id = TorrentID::fromInfoHash(job.torrentHandle.info_hashes());
|
||||
#else
|
||||
const auto id = TorrentID::fromInfoHash(job.torrentHandle.info_hash());
|
||||
#endif
|
||||
const TorrentImpl *torrent = m_torrents.value(id);
|
||||
const QString torrentName = (torrent ? torrent->name() : id.toString());
|
||||
LogMsg(tr("Moving \"%1\" to \"%2\"...").arg(torrentName, job.path));
|
||||
|
||||
job.torrentHandle.move_storage(job.path.toUtf8().constData()
|
||||
@@ -4094,15 +4145,9 @@ void Session::configureDeferred()
|
||||
{
|
||||
if (m_deferredConfigureScheduled)
|
||||
return;
|
||||
m_deferredConfigureScheduled = true;
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
QMetaObject::invokeMethod(this
|
||||
, qOverload<>(&Session::configure)
|
||||
, Qt::QueuedConnection);
|
||||
#else
|
||||
QMetaObject::invokeMethod(this, "configure", Qt::QueuedConnection);
|
||||
#endif
|
||||
m_deferredConfigureScheduled = true;
|
||||
QMetaObject::invokeMethod(this, qOverload<>(&Session::configure), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
// Enable IP Filtering
|
||||
@@ -4141,9 +4186,9 @@ void Session::disableIPFilter()
|
||||
m_nativeSession->set_ip_filter(filter);
|
||||
}
|
||||
|
||||
void Session::recursiveTorrentDownload(const InfoHash &hash)
|
||||
void Session::recursiveTorrentDownload(const TorrentID &id)
|
||||
{
|
||||
TorrentImpl *const torrent = m_torrents.value(hash);
|
||||
TorrentImpl *const torrent = m_torrents.value(id);
|
||||
if (!torrent) return;
|
||||
|
||||
for (int i = 0; i < torrent->filesCount(); ++i)
|
||||
@@ -4259,51 +4304,7 @@ bool Session::loadTorrentResumeData(const QByteArray &data, const TorrentInfo &m
|
||||
|
||||
const bool hasMetadata = (p.ti && p.ti->is_valid());
|
||||
if (!hasMetadata && !root.dict_find("info-hash"))
|
||||
{
|
||||
// TODO: The following code is deprecated. Remove after several releases in 4.3.x.
|
||||
// === BEGIN DEPRECATED CODE === //
|
||||
// Try to load from legacy data used in older versions for torrents w/o metadata
|
||||
const lt::bdecode_node magnetURINode = root.dict_find("qBt-magnetUri");
|
||||
if (magnetURINode.type() == lt::bdecode_node::string_t)
|
||||
{
|
||||
lt::parse_magnet_uri(magnetURINode.string_value(), p, ec);
|
||||
|
||||
if (isTempPathEnabled())
|
||||
{
|
||||
p.save_path = Utils::Fs::toNativePath(tempPath()).toStdString();
|
||||
}
|
||||
else
|
||||
{
|
||||
// If empty then Automatic mode, otherwise Manual mode
|
||||
const QString savePath = torrentParams.savePath.isEmpty() ? categorySavePath(torrentParams.category) : torrentParams.savePath;
|
||||
p.save_path = Utils::Fs::toNativePath(savePath).toStdString();
|
||||
}
|
||||
|
||||
// Preallocation mode
|
||||
p.storage_mode = (isPreallocationEnabled() ? lt::storage_mode_allocate : lt::storage_mode_sparse);
|
||||
|
||||
const lt::bdecode_node addedTimeNode = root.dict_find("qBt-addedTime");
|
||||
if (addedTimeNode.type() == lt::bdecode_node::int_t)
|
||||
p.added_time = addedTimeNode.int_value();
|
||||
|
||||
const lt::bdecode_node sequentialNode = root.dict_find("qBt-sequential");
|
||||
if (sequentialNode.type() == lt::bdecode_node::int_t)
|
||||
{
|
||||
if (static_cast<bool>(sequentialNode.int_value()))
|
||||
p.flags |= lt::torrent_flags::sequential_download;
|
||||
else
|
||||
p.flags &= ~lt::torrent_flags::sequential_download;
|
||||
}
|
||||
|
||||
if (torrentParams.name.isEmpty() && !p.name.empty())
|
||||
torrentParams.name = QString::fromStdString(p.name);
|
||||
}
|
||||
// === END DEPRECATED CODE === //
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -4568,7 +4569,7 @@ void Session::createTorrent(const lt::torrent_handle &nativeHandle)
|
||||
const LoadTorrentParams params = m_loadingTorrents.take(nativeHandle.info_hash());
|
||||
|
||||
auto *const torrent = new TorrentImpl {this, m_nativeSession, nativeHandle, params};
|
||||
m_torrents.insert(torrent->hash(), torrent);
|
||||
m_torrents.insert(torrent->id(), torrent);
|
||||
|
||||
const bool hasMetadata = torrent->hasMetadata();
|
||||
|
||||
@@ -4583,7 +4584,7 @@ void Session::createTorrent(const lt::torrent_handle &nativeHandle)
|
||||
{
|
||||
// Backup torrent file
|
||||
const QDir resumeDataDir {m_resumeFolderPath};
|
||||
const QString torrentFileName {QString {"%1.torrent"}.arg(torrent->hash())};
|
||||
const QString torrentFileName {QString::fromLatin1("%1.torrent").arg(torrent->id().toString())};
|
||||
try
|
||||
{
|
||||
torrent->info().saveToFile(resumeDataDir.absoluteFilePath(torrentFileName));
|
||||
@@ -4641,9 +4642,13 @@ void Session::handleAddTorrentAlert(const lt::add_torrent_alert *p)
|
||||
|
||||
void Session::handleTorrentRemovedAlert(const lt::torrent_removed_alert *p)
|
||||
{
|
||||
const InfoHash infoHash {p->info_hash};
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
const auto id = TorrentID::fromInfoHash(p->info_hashes);
|
||||
#else
|
||||
const auto id = TorrentID::fromInfoHash(p->info_hash);
|
||||
#endif
|
||||
|
||||
const auto removingTorrentDataIter = m_removingTorrents.find(infoHash);
|
||||
const auto removingTorrentDataIter = m_removingTorrents.find(id);
|
||||
if (removingTorrentDataIter != m_removingTorrents.end())
|
||||
{
|
||||
if (removingTorrentDataIter->deleteOption == DeleteTorrent)
|
||||
@@ -4656,8 +4661,13 @@ void Session::handleTorrentRemovedAlert(const lt::torrent_removed_alert *p)
|
||||
|
||||
void Session::handleTorrentDeletedAlert(const lt::torrent_deleted_alert *p)
|
||||
{
|
||||
const InfoHash infoHash {p->info_hash};
|
||||
const auto removingTorrentDataIter = m_removingTorrents.find(infoHash);
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
const auto id = TorrentID::fromInfoHash(p->info_hashes);
|
||||
#else
|
||||
const auto id = TorrentID::fromInfoHash(p->info_hash);
|
||||
#endif
|
||||
|
||||
const auto removingTorrentDataIter = m_removingTorrents.find(id);
|
||||
|
||||
if (removingTorrentDataIter == m_removingTorrents.end())
|
||||
return;
|
||||
@@ -4669,8 +4679,13 @@ void Session::handleTorrentDeletedAlert(const lt::torrent_deleted_alert *p)
|
||||
|
||||
void Session::handleTorrentDeleteFailedAlert(const lt::torrent_delete_failed_alert *p)
|
||||
{
|
||||
const InfoHash infoHash {p->info_hash};
|
||||
const auto removingTorrentDataIter = m_removingTorrents.find(infoHash);
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
const auto id = TorrentID::fromInfoHash(p->info_hashes);
|
||||
#else
|
||||
const auto id = TorrentID::fromInfoHash(p->info_hash);
|
||||
#endif
|
||||
|
||||
const auto removingTorrentDataIter = m_removingTorrents.find(id);
|
||||
|
||||
if (removingTorrentDataIter == m_removingTorrents.end())
|
||||
return;
|
||||
@@ -4694,8 +4709,13 @@ void Session::handleTorrentDeleteFailedAlert(const lt::torrent_delete_failed_ale
|
||||
|
||||
void Session::handleMetadataReceivedAlert(const lt::metadata_received_alert *p)
|
||||
{
|
||||
const InfoHash hash {p->handle.info_hash()};
|
||||
const auto downloadedMetadataIter = m_downloadedMetadata.find(hash);
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
const auto id = TorrentID::fromInfoHash(p->handle.info_hashes());
|
||||
#else
|
||||
const auto id = TorrentID::fromInfoHash(p->handle.info_hash());
|
||||
#endif
|
||||
|
||||
const auto downloadedMetadataIter = m_downloadedMetadata.find(id);
|
||||
|
||||
if (downloadedMetadataIter != m_downloadedMetadata.end())
|
||||
{
|
||||
@@ -4716,11 +4736,11 @@ void Session::handleFileErrorAlert(const lt::file_error_alert *p)
|
||||
if (!torrent)
|
||||
return;
|
||||
|
||||
const InfoHash hash = torrent->hash();
|
||||
const TorrentID id = torrent->id();
|
||||
|
||||
if (!m_recentErroredTorrents.contains(hash))
|
||||
if (!m_recentErroredTorrents.contains(id))
|
||||
{
|
||||
m_recentErroredTorrents.insert(hash);
|
||||
m_recentErroredTorrents.insert(id);
|
||||
|
||||
const QString msg = QString::fromStdString(p->message());
|
||||
LogMsg(tr("File error alert. Torrent: \"%1\". File: \"%2\". Reason: %3")
|
||||
@@ -4919,9 +4939,14 @@ void Session::handleStorageMovedAlert(const lt::storage_moved_alert *p)
|
||||
const QString newPath {p->storage_path()};
|
||||
Q_ASSERT(newPath == currentJob.path);
|
||||
|
||||
const InfoHash infoHash = currentJob.torrentHandle.info_hash();
|
||||
TorrentImpl *torrent = m_torrents.value(infoHash);
|
||||
const QString torrentName = (torrent ? torrent->name() : QString {infoHash});
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
const auto id = TorrentID::fromInfoHash(currentJob.torrentHandle.info_hashes());
|
||||
#else
|
||||
const auto id = TorrentID::fromInfoHash(currentJob.torrentHandle.info_hash());
|
||||
#endif
|
||||
|
||||
TorrentImpl *torrent = m_torrents.value(id);
|
||||
const QString torrentName = (torrent ? torrent->name() : id.toString());
|
||||
LogMsg(tr("\"%1\" is successfully moved to \"%2\".").arg(torrentName, newPath));
|
||||
|
||||
handleMoveTorrentStorageJobFinished();
|
||||
@@ -4934,9 +4959,14 @@ void Session::handleStorageMovedFailedAlert(const lt::storage_moved_failed_alert
|
||||
const MoveStorageJob ¤tJob = m_moveStorageQueue.first();
|
||||
Q_ASSERT(currentJob.torrentHandle == p->handle);
|
||||
|
||||
const InfoHash infoHash = currentJob.torrentHandle.info_hash();
|
||||
TorrentImpl *torrent = m_torrents.value(infoHash);
|
||||
const QString torrentName = (torrent ? torrent->name() : QString {infoHash});
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
const auto id = TorrentID::fromInfoHash(currentJob.torrentHandle.info_hashes());
|
||||
#else
|
||||
const auto id = TorrentID::fromInfoHash(currentJob.torrentHandle.info_hash());
|
||||
#endif
|
||||
|
||||
TorrentImpl *torrent = m_torrents.value(id);
|
||||
const QString torrentName = (torrent ? torrent->name() : id.toString());
|
||||
const QString currentLocation = QString::fromStdString(p->handle.status(lt::torrent_handle::query_save_path).save_path);
|
||||
const QString errorMessage = QString::fromStdString(p->message());
|
||||
LogMsg(tr("Failed to move \"%1\" from \"%2\" to \"%3\". Reason: %4.")
|
||||
@@ -4952,8 +4982,12 @@ void Session::handleStateUpdateAlert(const lt::state_update_alert *p)
|
||||
|
||||
for (const lt::torrent_status &status : p->status)
|
||||
{
|
||||
TorrentImpl *const torrent = m_torrents.value(status.info_hash);
|
||||
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
const auto id = TorrentID::fromInfoHash(status.info_hashes);
|
||||
#else
|
||||
const auto id = TorrentID::fromInfoHash(status.info_hash);
|
||||
#endif
|
||||
TorrentImpl *const torrent = m_torrents.value(id);
|
||||
if (!torrent)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -51,14 +51,6 @@
|
||||
#include "sessionstatus.h"
|
||||
#include "torrentinfo.h"
|
||||
|
||||
#if !defined(Q_OS_WIN) || (LIBTORRENT_VERSION_NUM >= 10212)
|
||||
#define HAS_HTTPS_TRACKER_VALIDATION
|
||||
#endif
|
||||
|
||||
#if ((LIBTORRENT_VERSION_NUM >= 10212) && (LIBTORRENT_VERSION_NUM < 20000)) || (LIBTORRENT_VERSION_NUM >= 20002)
|
||||
#define HAS_IDN_SUPPORT
|
||||
#endif
|
||||
|
||||
class QFile;
|
||||
class QNetworkConfiguration;
|
||||
class QNetworkConfigurationManager;
|
||||
@@ -107,8 +99,8 @@ namespace BitTorrent
|
||||
class Torrent;
|
||||
class TorrentImpl;
|
||||
class Tracker;
|
||||
class TrackerEntry;
|
||||
struct LoadTorrentParams;
|
||||
struct TrackerEntry;
|
||||
|
||||
enum class MoveStorageMode;
|
||||
|
||||
@@ -392,6 +384,8 @@ namespace BitTorrent
|
||||
void setOutgoingPortsMax(int max);
|
||||
int UPnPLeaseDuration() const;
|
||||
void setUPnPLeaseDuration(int duration);
|
||||
int peerToS() const;
|
||||
void setPeerToS(int value);
|
||||
bool ignoreLimitsOnLAN() const;
|
||||
void setIgnoreLimitsOnLAN(bool ignore);
|
||||
bool includeOverheadInLimits() const;
|
||||
@@ -440,7 +434,7 @@ namespace BitTorrent
|
||||
#endif
|
||||
|
||||
void startUpTorrents();
|
||||
Torrent *findTorrent(const InfoHash &hash) const;
|
||||
Torrent *findTorrent(const TorrentID &id) const;
|
||||
QVector<Torrent *> torrents() const;
|
||||
bool hasActiveTorrents() const;
|
||||
bool hasUnfinishedTorrents() const;
|
||||
@@ -456,21 +450,22 @@ namespace BitTorrent
|
||||
|
||||
void banIP(const QString &ip);
|
||||
|
||||
bool isKnownTorrent(const InfoHash &hash) const;
|
||||
bool isKnownTorrent(const TorrentID &id) const;
|
||||
bool addTorrent(const QString &source, const AddTorrentParams ¶ms = AddTorrentParams());
|
||||
bool addTorrent(const MagnetUri &magnetUri, const AddTorrentParams ¶ms = AddTorrentParams());
|
||||
bool addTorrent(const TorrentInfo &torrentInfo, const AddTorrentParams ¶ms = AddTorrentParams());
|
||||
bool deleteTorrent(const InfoHash &hash, DeleteOption deleteOption = DeleteTorrent);
|
||||
bool deleteTorrent(const TorrentID &id, DeleteOption deleteOption = DeleteTorrent);
|
||||
bool downloadMetadata(const MagnetUri &magnetUri);
|
||||
bool cancelDownloadMetadata(const InfoHash &hash);
|
||||
bool cancelDownloadMetadata(const TorrentID &id);
|
||||
|
||||
void recursiveTorrentDownload(const InfoHash &hash);
|
||||
void increaseTorrentsQueuePos(const QVector<InfoHash> &hashes);
|
||||
void decreaseTorrentsQueuePos(const QVector<InfoHash> &hashes);
|
||||
void topTorrentsQueuePos(const QVector<InfoHash> &hashes);
|
||||
void bottomTorrentsQueuePos(const QVector<InfoHash> &hashes);
|
||||
void recursiveTorrentDownload(const TorrentID &id);
|
||||
void increaseTorrentsQueuePos(const QVector<TorrentID> &ids);
|
||||
void decreaseTorrentsQueuePos(const QVector<TorrentID> &ids);
|
||||
void topTorrentsQueuePos(const QVector<TorrentID> &ids);
|
||||
void bottomTorrentsQueuePos(const QVector<TorrentID> &ids);
|
||||
|
||||
// Torrent interface
|
||||
void handleTorrentNeedSaveResumeData(const TorrentImpl *torrent);
|
||||
void handleTorrentSaveResumeDataRequested(const TorrentImpl *torrent);
|
||||
void handleTorrentShareLimitChanged(TorrentImpl *const torrent);
|
||||
void handleTorrentNameChanged(TorrentImpl *const torrent);
|
||||
@@ -489,7 +484,7 @@ namespace BitTorrent
|
||||
void handleTorrentTrackersChanged(TorrentImpl *const torrent);
|
||||
void handleTorrentUrlSeedsAdded(TorrentImpl *const torrent, const QVector<QUrl> &newUrlSeeds);
|
||||
void handleTorrentUrlSeedsRemoved(TorrentImpl *const torrent, const QVector<QUrl> &urlSeeds);
|
||||
void handleTorrentResumeDataReady(TorrentImpl *const torrent, const std::shared_ptr<lt::entry> &data);
|
||||
void handleTorrentResumeDataReady(TorrentImpl *const torrent, const LoadTorrentParams &data);
|
||||
void handleTorrentTrackerReply(TorrentImpl *const torrent, const QString &trackerUrl);
|
||||
void handleTorrentTrackerWarning(TorrentImpl *const torrent, const QString &trackerUrl);
|
||||
void handleTorrentTrackerError(TorrentImpl *const torrent, const QString &trackerUrl);
|
||||
@@ -545,7 +540,7 @@ namespace BitTorrent
|
||||
void handleIPFilterParsed(int ruleCount);
|
||||
void handleIPFilterError();
|
||||
void handleDownloadFinished(const Net::DownloadResult &result);
|
||||
void fileSearchFinished(const InfoHash &id, const QString &savePath, const QStringList &fileNames);
|
||||
void fileSearchFinished(const TorrentID &id, const QString &savePath, const QStringList &fileNames);
|
||||
|
||||
// Session reconfiguration triggers
|
||||
void networkOnlineStateChanged(bool online);
|
||||
@@ -632,8 +627,8 @@ namespace BitTorrent
|
||||
void createTorrent(const lt::torrent_handle &nativeHandle);
|
||||
|
||||
void saveResumeData();
|
||||
void saveTorrentsQueue();
|
||||
void removeTorrentsQueue();
|
||||
void saveTorrentsQueue() const;
|
||||
void removeTorrentsQueue() const;
|
||||
|
||||
std::vector<lt::alert *> getPendingAlerts(lt::time_duration time = lt::time_duration::zero()) const;
|
||||
|
||||
@@ -681,6 +676,7 @@ namespace BitTorrent
|
||||
CachedSettingValue<int> m_outgoingPortsMin;
|
||||
CachedSettingValue<int> m_outgoingPortsMax;
|
||||
CachedSettingValue<int> m_UPnPLeaseDuration;
|
||||
CachedSettingValue<int> m_peerToS;
|
||||
CachedSettingValue<bool> m_ignoreLimitsOnLAN;
|
||||
CachedSettingValue<bool> m_includeOverheadInLimits;
|
||||
CachedSettingValue<QString> m_announceIP;
|
||||
@@ -769,17 +765,18 @@ namespace BitTorrent
|
||||
ResumeDataSavingManager *m_resumeDataSavingManager = nullptr;
|
||||
FileSearcher *m_fileSearcher = nullptr;
|
||||
|
||||
QSet<InfoHash> m_downloadedMetadata;
|
||||
QSet<TorrentID> m_downloadedMetadata;
|
||||
|
||||
QHash<InfoHash, TorrentImpl *> m_torrents;
|
||||
QHash<InfoHash, LoadTorrentParams> m_loadingTorrents;
|
||||
QHash<TorrentID, TorrentImpl *> m_torrents;
|
||||
QHash<TorrentID, LoadTorrentParams> m_loadingTorrents;
|
||||
QHash<QString, AddTorrentParams> m_downloadedTorrents;
|
||||
QHash<InfoHash, RemovingTorrentData> m_removingTorrents;
|
||||
QHash<TorrentID, RemovingTorrentData> m_removingTorrents;
|
||||
QSet<TorrentID> m_needSaveResumeDataTorrents;
|
||||
QStringMap m_categories;
|
||||
QSet<QString> m_tags;
|
||||
|
||||
// I/O errored torrents
|
||||
QSet<InfoHash> m_recentErroredTorrents;
|
||||
QSet<TorrentID> m_recentErroredTorrents;
|
||||
QTimer *m_recentErroredTorrentsTimer = nullptr;
|
||||
|
||||
SessionMetricIndices m_metricIndices;
|
||||
@@ -795,8 +792,3 @@ namespace BitTorrent
|
||||
static Session *m_instance;
|
||||
};
|
||||
}
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 10, 0))
|
||||
Q_DECLARE_METATYPE(std::shared_ptr<lt::entry>)
|
||||
const int sharedPtrLtEntryTypeID = qRegisterMetaType<std::shared_ptr<lt::entry>>();
|
||||
#endif
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
|
||||
#include "torrent.h"
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <QHash>
|
||||
|
||||
#include "infohash.h"
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
uint qHash(const TorrentState key, const uint seed)
|
||||
@@ -42,15 +42,20 @@ namespace BitTorrent
|
||||
|
||||
// Torrent
|
||||
|
||||
const qreal Torrent::USE_GLOBAL_RATIO = -2.;
|
||||
const qreal Torrent::NO_RATIO_LIMIT = -1.;
|
||||
const qreal Torrent::USE_GLOBAL_RATIO = -2;
|
||||
const qreal Torrent::NO_RATIO_LIMIT = -1;
|
||||
|
||||
const int Torrent::USE_GLOBAL_SEEDING_TIME = -2;
|
||||
const int Torrent::NO_SEEDING_TIME_LIMIT = -1;
|
||||
|
||||
const qreal Torrent::MAX_RATIO = 9999.;
|
||||
const qreal Torrent::MAX_RATIO = 9999;
|
||||
const int Torrent::MAX_SEEDING_TIME = 525600;
|
||||
|
||||
TorrentID Torrent::id() const
|
||||
{
|
||||
return infoHash().toTorrentID();
|
||||
}
|
||||
|
||||
bool Torrent::isResumed() const
|
||||
{
|
||||
return !isPaused();
|
||||
|
||||
@@ -44,9 +44,10 @@ namespace BitTorrent
|
||||
enum class DownloadPriority;
|
||||
class InfoHash;
|
||||
class PeerInfo;
|
||||
class TorrentID;
|
||||
class TorrentInfo;
|
||||
class TrackerEntry;
|
||||
struct PeerAddress;
|
||||
struct TrackerEntry;
|
||||
|
||||
enum class TorrentOperatingMode
|
||||
{
|
||||
@@ -105,7 +106,7 @@ namespace BitTorrent
|
||||
|
||||
virtual ~Torrent() = default;
|
||||
|
||||
virtual InfoHash hash() const = 0;
|
||||
virtual InfoHash infoHash() const = 0;
|
||||
virtual QString name() const = 0;
|
||||
virtual QDateTime creationDate() const = 0;
|
||||
virtual QString creator() const = 0;
|
||||
@@ -290,6 +291,7 @@ namespace BitTorrent
|
||||
|
||||
virtual QString createMagnetURI() const = 0;
|
||||
|
||||
TorrentID id() const;
|
||||
bool isResumed() const;
|
||||
qlonglong remainingSize() const;
|
||||
|
||||
|
||||
@@ -100,8 +100,6 @@ void TorrentCreatorThread::sendProgressSignal(int currentPieceIdx, int totalPiec
|
||||
|
||||
void TorrentCreatorThread::run()
|
||||
{
|
||||
const QString creatorStr("qBittorrent " QBT_VERSION);
|
||||
|
||||
emit updateProgress(0);
|
||||
|
||||
try
|
||||
@@ -178,17 +176,19 @@ void TorrentCreatorThread::run()
|
||||
newTorrent.add_tracker(tracker.trimmed().toStdString(), tier);
|
||||
}
|
||||
|
||||
if (isInterruptionRequested()) return;
|
||||
|
||||
// calculate the hash for all pieces
|
||||
lt::set_piece_hashes(newTorrent, Utils::Fs::toNativePath(parentPath).toStdString()
|
||||
, [this, &newTorrent](const lt::piece_index_t n)
|
||||
{
|
||||
if (isInterruptionRequested())
|
||||
throw RuntimeError {tr("Create new torrent aborted.")};
|
||||
|
||||
sendProgressSignal(static_cast<LTUnderlyingType<lt::piece_index_t>>(n), newTorrent.num_pieces());
|
||||
});
|
||||
|
||||
// Set qBittorrent as creator and add user comment to
|
||||
// torrent_info structure
|
||||
newTorrent.set_creator(creatorStr.toUtf8().constData());
|
||||
newTorrent.set_creator("qBittorrent " QBT_VERSION);
|
||||
newTorrent.set_comment(m_params.comment.toUtf8().constData());
|
||||
// Is private ?
|
||||
newTorrent.set_priv(m_params.isPrivate);
|
||||
@@ -207,8 +207,7 @@ void TorrentCreatorThread::run()
|
||||
QFile outfile {m_params.savePath};
|
||||
if (!outfile.open(QIODevice::WriteOnly))
|
||||
{
|
||||
throw RuntimeError
|
||||
{tr("Create new torrent file failed. Reason: %1")
|
||||
throw RuntimeError {tr("Create new torrent file failed. Reason: %1")
|
||||
.arg(outfile.errorString())};
|
||||
}
|
||||
|
||||
@@ -217,8 +216,7 @@ void TorrentCreatorThread::run()
|
||||
lt::bencode(Utils::IO::FileDeviceOutputIterator {outfile}, entry);
|
||||
if (outfile.error() != QFileDevice::NoError)
|
||||
{
|
||||
throw RuntimeError
|
||||
{tr("Create new torrent file failed. Reason: %1")
|
||||
throw RuntimeError {tr("Create new torrent file failed. Reason: %1")
|
||||
.arg(outfile.errorString())};
|
||||
}
|
||||
outfile.close();
|
||||
|
||||
@@ -39,13 +39,15 @@
|
||||
|
||||
#include <libtorrent/address.hpp>
|
||||
#include <libtorrent/alert_types.hpp>
|
||||
#include <libtorrent/entry.hpp>
|
||||
#include <libtorrent/magnet_uri.hpp>
|
||||
#include <libtorrent/session.hpp>
|
||||
#include <libtorrent/storage_defs.hpp>
|
||||
#include <libtorrent/time.hpp>
|
||||
#include <libtorrent/version.hpp>
|
||||
#include <libtorrent/write_resume_data.hpp>
|
||||
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
#include <libtorrent/info_hash.hpp>
|
||||
#endif
|
||||
|
||||
#include <QBitArray>
|
||||
#include <QDebug>
|
||||
@@ -57,7 +59,6 @@
|
||||
#include "base/global.h"
|
||||
#include "base/logger.h"
|
||||
#include "base/preferences.h"
|
||||
#include "base/profile.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/string.h"
|
||||
#include "common.h"
|
||||
@@ -87,14 +88,135 @@ namespace
|
||||
return out;
|
||||
}
|
||||
|
||||
using ListType = lt::entry::list_type;
|
||||
|
||||
ListType setToEntryList(const QSet<QString> &input)
|
||||
lt::announce_entry makeNativeAnnouncerEntry(const QString &url, const int tier)
|
||||
{
|
||||
ListType entryList;
|
||||
for (const QString &setValue : input)
|
||||
entryList.emplace_back(setValue.toStdString());
|
||||
return entryList;
|
||||
lt::announce_entry entry {url.toStdString()};
|
||||
entry.tier = tier;
|
||||
return entry;
|
||||
}
|
||||
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
TrackerEntry fromNativeAnnouncerEntry(const lt::announce_entry &nativeEntry, const lt::info_hash_t &hashes)
|
||||
#else
|
||||
TrackerEntry fromNativeAnnouncerEntry(const lt::announce_entry &nativeEntry)
|
||||
#endif
|
||||
{
|
||||
TrackerEntry trackerEntry {QString::fromStdString(nativeEntry.url), nativeEntry.tier};
|
||||
|
||||
int numUpdating = 0;
|
||||
int numWorking = 0;
|
||||
int numNotWorking = 0;
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
const int numEndpoints = nativeEntry.endpoints.size() * ((hashes.has_v1() && hashes.has_v2()) ? 2 : 1);
|
||||
trackerEntry.endpoints.reserve(numEndpoints);
|
||||
for (const lt::announce_endpoint &endpoint : nativeEntry.endpoints)
|
||||
{
|
||||
for (const auto protocolVersion : {lt::protocol_version::V1, lt::protocol_version::V2})
|
||||
{
|
||||
if (hashes.has(protocolVersion))
|
||||
{
|
||||
const lt::announce_infohash &infoHash = endpoint.info_hashes[protocolVersion];
|
||||
|
||||
TrackerEntry::EndpointStats trackerEndpoint;
|
||||
trackerEndpoint.protocolVersion = (protocolVersion == lt::protocol_version::V1) ? 1 : 2;
|
||||
trackerEndpoint.numSeeds = infoHash.scrape_complete;
|
||||
trackerEndpoint.numLeeches = infoHash.scrape_incomplete;
|
||||
trackerEndpoint.numDownloaded = infoHash.scrape_downloaded;
|
||||
if (infoHash.updating)
|
||||
{
|
||||
trackerEndpoint.status = TrackerEntry::Updating;
|
||||
++numUpdating;
|
||||
}
|
||||
else if (infoHash.fails > 0)
|
||||
{
|
||||
trackerEndpoint.status = TrackerEntry::NotWorking;
|
||||
++numNotWorking;
|
||||
}
|
||||
else if (nativeEntry.verified)
|
||||
{
|
||||
trackerEndpoint.status = TrackerEntry::Working;
|
||||
++numWorking;
|
||||
}
|
||||
else
|
||||
{
|
||||
trackerEndpoint.status = TrackerEntry::NotContacted;
|
||||
}
|
||||
trackerEntry.endpoints.append(trackerEndpoint);
|
||||
|
||||
trackerEntry.numSeeds = std::max(trackerEntry.numSeeds, infoHash.scrape_complete);
|
||||
trackerEntry.numLeeches = std::max(trackerEntry.numLeeches, infoHash.scrape_incomplete);
|
||||
trackerEntry.numDownloaded = std::max(trackerEntry.numDownloaded, infoHash.scrape_downloaded);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
const int numEndpoints = nativeEntry.endpoints.size();
|
||||
trackerEntry.endpoints.reserve(numEndpoints);
|
||||
for (const lt::announce_endpoint &endpoint : nativeEntry.endpoints)
|
||||
{
|
||||
TrackerEntry::EndpointStats trackerEndpoint;
|
||||
trackerEndpoint.numSeeds = endpoint.scrape_complete;
|
||||
trackerEndpoint.numLeeches = endpoint.scrape_incomplete;
|
||||
trackerEndpoint.numDownloaded = endpoint.scrape_downloaded;
|
||||
if (endpoint.updating)
|
||||
{
|
||||
trackerEndpoint.status = TrackerEntry::Updating;
|
||||
++numUpdating;
|
||||
}
|
||||
else if (endpoint.fails > 0)
|
||||
{
|
||||
trackerEndpoint.status = TrackerEntry::NotWorking;
|
||||
++numNotWorking;
|
||||
}
|
||||
else if (nativeEntry.verified)
|
||||
{
|
||||
trackerEndpoint.status = TrackerEntry::Working;
|
||||
++numWorking;
|
||||
}
|
||||
else
|
||||
{
|
||||
trackerEndpoint.status = TrackerEntry::NotContacted;
|
||||
}
|
||||
trackerEntry.endpoints.append(trackerEndpoint);
|
||||
|
||||
trackerEntry.numSeeds = std::max(trackerEntry.numSeeds, endpoint.scrape_complete);
|
||||
trackerEntry.numLeeches = std::max(trackerEntry.numLeeches, endpoint.scrape_incomplete);
|
||||
trackerEntry.numDownloaded = std::max(trackerEntry.numDownloaded, endpoint.scrape_downloaded);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (numEndpoints > 0)
|
||||
{
|
||||
if (numUpdating > 0)
|
||||
trackerEntry.status = TrackerEntry::Updating;
|
||||
else if (numWorking > 0)
|
||||
trackerEntry.status = TrackerEntry::Working;
|
||||
else if (numNotWorking == numEndpoints)
|
||||
trackerEntry.status = TrackerEntry::NotWorking;
|
||||
}
|
||||
|
||||
return trackerEntry;
|
||||
}
|
||||
|
||||
void initializeStatus(lt::torrent_status &status, const lt::add_torrent_params ¶ms)
|
||||
{
|
||||
status.flags = params.flags;
|
||||
status.active_duration = lt::seconds {params.active_time};
|
||||
status.finished_duration = lt::seconds {params.finished_time};
|
||||
status.seeding_duration = lt::seconds {params.seeding_time};
|
||||
status.num_complete = params.num_complete;
|
||||
status.num_incomplete = params.num_incomplete;
|
||||
status.all_time_download = params.total_downloaded;
|
||||
status.all_time_upload = params.total_uploaded;
|
||||
status.added_time = params.added_time;
|
||||
status.last_seen_complete = params.last_seen_complete;
|
||||
status.last_download = lt::time_point {lt::seconds {params.last_download}};
|
||||
status.last_upload = lt::time_point {lt::seconds {params.last_upload}};
|
||||
status.completed_time = params.completed_time;
|
||||
status.save_path = params.save_path;
|
||||
status.connections_limit = params.max_connections;
|
||||
status.pieces = params.have_pieces;
|
||||
status.verified_pieces = params.verified_pieces;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,6 +228,11 @@ TorrentImpl::TorrentImpl(Session *session, lt::session *nativeSession
|
||||
, m_session(session)
|
||||
, m_nativeSession(nativeSession)
|
||||
, m_nativeHandle(nativeHandle)
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
, m_infoHash(m_nativeHandle.info_hashes())
|
||||
#else
|
||||
, m_infoHash(m_nativeHandle.info_hash())
|
||||
#endif
|
||||
, m_name(params.name)
|
||||
, m_savePath(Utils::Fs::toNativePath(params.savePath))
|
||||
, m_category(params.category)
|
||||
@@ -123,7 +250,6 @@ TorrentImpl::TorrentImpl(Session *session, lt::session *nativeSession
|
||||
if (m_useAutoTMM)
|
||||
m_savePath = Utils::Fs::toNativePath(m_session->categorySavePath(m_category));
|
||||
|
||||
m_hash = InfoHash {m_nativeHandle.info_hash()};
|
||||
if (m_ltAddTorrentParams.ti)
|
||||
{
|
||||
// Initialize it only if torrent is added with metadata.
|
||||
@@ -131,7 +257,8 @@ TorrentImpl::TorrentImpl(Session *session, lt::session *nativeSession
|
||||
m_torrentInfo = TorrentInfo {m_nativeHandle.torrent_file()};
|
||||
}
|
||||
|
||||
updateStatus();
|
||||
initializeStatus(m_nativeStatus, m_ltAddTorrentParams);
|
||||
updateState();
|
||||
|
||||
if (hasMetadata())
|
||||
applyFirstLastPiecePriority(m_hasFirstLastPiecePriority);
|
||||
@@ -168,9 +295,9 @@ bool TorrentImpl::isValid() const
|
||||
return m_nativeHandle.is_valid();
|
||||
}
|
||||
|
||||
InfoHash TorrentImpl::hash() const
|
||||
InfoHash TorrentImpl::infoHash() const
|
||||
{
|
||||
return m_hash;
|
||||
return m_infoHash;
|
||||
}
|
||||
|
||||
QString TorrentImpl::name() const
|
||||
@@ -185,7 +312,7 @@ QString TorrentImpl::name() const
|
||||
if (!name.isEmpty())
|
||||
return name;
|
||||
|
||||
return m_hash;
|
||||
return id().toString();
|
||||
}
|
||||
|
||||
QDateTime TorrentImpl::creationDate() const
|
||||
@@ -284,6 +411,7 @@ void TorrentImpl::setAutoTMMEnabled(bool enabled)
|
||||
if (m_useAutoTMM == enabled) return;
|
||||
|
||||
m_useAutoTMM = enabled;
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentSavingModeChanged(this);
|
||||
|
||||
if (m_useAutoTMM)
|
||||
@@ -311,7 +439,11 @@ QVector<TrackerEntry> TorrentImpl::trackers() const
|
||||
entries.reserve(nativeTrackers.size());
|
||||
|
||||
for (const lt::announce_entry &tracker : nativeTrackers)
|
||||
entries << tracker;
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
entries << fromNativeAnnouncerEntry(tracker, m_nativeHandle.info_hashes());
|
||||
#else
|
||||
entries << fromNativeAnnouncerEntry(tracker);
|
||||
#endif
|
||||
|
||||
return entries;
|
||||
}
|
||||
@@ -325,7 +457,7 @@ void TorrentImpl::addTrackers(const QVector<TrackerEntry> &trackers)
|
||||
{
|
||||
QSet<TrackerEntry> currentTrackers;
|
||||
for (const lt::announce_entry &entry : m_nativeHandle.trackers())
|
||||
currentTrackers << entry;
|
||||
currentTrackers.insert({QString::fromStdString(entry.url), entry.tier});
|
||||
|
||||
QVector<TrackerEntry> newTrackers;
|
||||
newTrackers.reserve(trackers.size());
|
||||
@@ -334,13 +466,16 @@ void TorrentImpl::addTrackers(const QVector<TrackerEntry> &trackers)
|
||||
{
|
||||
if (!currentTrackers.contains(tracker))
|
||||
{
|
||||
m_nativeHandle.add_tracker(tracker.nativeEntry());
|
||||
m_nativeHandle.add_tracker(makeNativeAnnouncerEntry(tracker.url, tracker.tier));
|
||||
newTrackers << tracker;
|
||||
}
|
||||
}
|
||||
|
||||
if (!newTrackers.isEmpty())
|
||||
{
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentTrackersAdded(this, newTrackers);
|
||||
}
|
||||
}
|
||||
|
||||
void TorrentImpl::replaceTrackers(const QVector<TrackerEntry> &trackers)
|
||||
@@ -355,7 +490,7 @@ void TorrentImpl::replaceTrackers(const QVector<TrackerEntry> &trackers)
|
||||
|
||||
for (const TrackerEntry &tracker : trackers)
|
||||
{
|
||||
nativeTrackers.emplace_back(tracker.nativeEntry());
|
||||
nativeTrackers.emplace_back(makeNativeAnnouncerEntry(tracker.url, tracker.tier));
|
||||
|
||||
if (!currentTrackers.removeOne(tracker))
|
||||
newTrackers << tracker;
|
||||
@@ -363,6 +498,8 @@ void TorrentImpl::replaceTrackers(const QVector<TrackerEntry> &trackers)
|
||||
|
||||
m_nativeHandle.replace_trackers(nativeTrackers);
|
||||
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
|
||||
if (newTrackers.isEmpty() && currentTrackers.isEmpty())
|
||||
{
|
||||
// when existing tracker reorders
|
||||
@@ -414,7 +551,10 @@ void TorrentImpl::addUrlSeeds(const QVector<QUrl> &urlSeeds)
|
||||
}
|
||||
|
||||
if (!addedUrlSeeds.isEmpty())
|
||||
{
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentUrlSeedsAdded(this, addedUrlSeeds);
|
||||
}
|
||||
}
|
||||
|
||||
void TorrentImpl::removeUrlSeeds(const QVector<QUrl> &urlSeeds)
|
||||
@@ -435,7 +575,10 @@ void TorrentImpl::removeUrlSeeds(const QVector<QUrl> &urlSeeds)
|
||||
}
|
||||
|
||||
if (!removedUrlSeeds.isEmpty())
|
||||
{
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentUrlSeedsRemoved(this, removedUrlSeeds);
|
||||
}
|
||||
}
|
||||
|
||||
void TorrentImpl::clearPeers()
|
||||
@@ -467,9 +610,7 @@ bool TorrentImpl::connectPeer(const PeerAddress &peerAddress)
|
||||
|
||||
bool TorrentImpl::needSaveResumeData() const
|
||||
{
|
||||
if (m_isStopped && !(m_nativeStatus.flags & lt::torrent_flags::auto_managed))
|
||||
return false;
|
||||
return m_nativeStatus.need_save_resume;
|
||||
return m_nativeHandle.need_save_resume_data();
|
||||
}
|
||||
|
||||
void TorrentImpl::saveResumeData()
|
||||
@@ -548,6 +689,7 @@ bool TorrentImpl::addTag(const QString &tag)
|
||||
if (!m_session->addTag(tag))
|
||||
return false;
|
||||
m_tags.insert(tag);
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentTagAdded(this, tag);
|
||||
return true;
|
||||
}
|
||||
@@ -558,6 +700,7 @@ bool TorrentImpl::removeTag(const QString &tag)
|
||||
{
|
||||
if (m_tags.remove(tag))
|
||||
{
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentTagRemoved(this, tag);
|
||||
return true;
|
||||
}
|
||||
@@ -804,7 +947,7 @@ bool TorrentImpl::hasMissingFiles() const
|
||||
|
||||
bool TorrentImpl::hasError() const
|
||||
{
|
||||
return static_cast<bool>(m_nativeStatus.errc);
|
||||
return (m_nativeStatus.errc || (m_nativeStatus.flags & lt::torrent_flags::upload_mode));
|
||||
}
|
||||
|
||||
bool TorrentImpl::hasFilteredPieces() const
|
||||
@@ -818,14 +961,18 @@ bool TorrentImpl::hasFilteredPieces() const
|
||||
|
||||
int TorrentImpl::queuePosition() const
|
||||
{
|
||||
if (m_nativeStatus.queue_position < lt::queue_position_t {0}) return 0;
|
||||
|
||||
return static_cast<int>(m_nativeStatus.queue_position) + 1;
|
||||
return static_cast<int>(m_nativeStatus.queue_position);
|
||||
}
|
||||
|
||||
QString TorrentImpl::error() const
|
||||
{
|
||||
return QString::fromStdString(m_nativeStatus.errc.message());
|
||||
if (m_nativeStatus.errc)
|
||||
return QString::fromStdString(m_nativeStatus.errc.message());
|
||||
|
||||
if (m_nativeStatus.flags & lt::torrent_flags::upload_mode)
|
||||
return tr("There's not enough space on disk. Torrent is currently in \"upload only\" mode.");
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
qlonglong TorrentImpl::totalDownload() const
|
||||
@@ -1150,6 +1297,7 @@ void TorrentImpl::setName(const QString &name)
|
||||
if (m_name != name)
|
||||
{
|
||||
m_name = name;
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentNameChanged(this);
|
||||
}
|
||||
}
|
||||
@@ -1163,6 +1311,7 @@ bool TorrentImpl::setCategory(const QString &category)
|
||||
|
||||
const QString oldCategory = m_category;
|
||||
m_category = category;
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentCategoryChanged(this, oldCategory);
|
||||
|
||||
if (m_useAutoTMM)
|
||||
@@ -1182,6 +1331,7 @@ void TorrentImpl::move(QString path)
|
||||
if (m_useAutoTMM)
|
||||
{
|
||||
m_useAutoTMM = false;
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentSavingModeChanged(this);
|
||||
}
|
||||
|
||||
@@ -1197,8 +1347,8 @@ void TorrentImpl::move(QString path)
|
||||
void TorrentImpl::move_impl(QString path, const MoveStorageMode mode)
|
||||
{
|
||||
if (path == savePath()) return;
|
||||
path = Utils::Fs::toNativePath(path);
|
||||
|
||||
path = Utils::Fs::toNativePath(path);
|
||||
if (!useTempPath())
|
||||
{
|
||||
moveStorage(path, mode);
|
||||
@@ -1206,6 +1356,7 @@ void TorrentImpl::move_impl(QString path, const MoveStorageMode mode)
|
||||
else
|
||||
{
|
||||
m_savePath = path;
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentSavePathChanged(this);
|
||||
}
|
||||
}
|
||||
@@ -1249,7 +1400,7 @@ void TorrentImpl::setSequentialDownload(const bool enable)
|
||||
m_nativeStatus.flags &= ~lt::torrent_flags::sequential_download; // prevent return cached value
|
||||
}
|
||||
|
||||
saveResumeData();
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
}
|
||||
|
||||
void TorrentImpl::setFirstLastPiecePriority(const bool enabled)
|
||||
@@ -1264,7 +1415,7 @@ void TorrentImpl::setFirstLastPiecePriority(const bool enabled)
|
||||
LogMsg(tr("Download first and last piece first: %1, torrent: '%2'")
|
||||
.arg((enabled ? tr("On") : tr("Off")), name()));
|
||||
|
||||
saveResumeData();
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
}
|
||||
|
||||
void TorrentImpl::applyFirstLastPiecePriority(const bool enabled, const QVector<DownloadPriority> &updatedFilePrio)
|
||||
@@ -1364,6 +1515,7 @@ void TorrentImpl::pause()
|
||||
if (!m_isStopped)
|
||||
{
|
||||
m_isStopped = true;
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentPaused(this);
|
||||
}
|
||||
|
||||
@@ -1379,7 +1531,10 @@ void TorrentImpl::pause()
|
||||
void TorrentImpl::resume(const TorrentOperatingMode mode)
|
||||
{
|
||||
if (hasError())
|
||||
{
|
||||
m_nativeHandle.clear_error();
|
||||
m_nativeHandle.unset_flags(lt::torrent_flags::upload_mode);
|
||||
}
|
||||
|
||||
m_operatingMode = mode;
|
||||
|
||||
@@ -1387,6 +1542,7 @@ void TorrentImpl::resume(const TorrentOperatingMode mode)
|
||||
{
|
||||
m_hasMissingFiles = false;
|
||||
m_isStopped = false;
|
||||
m_ltAddTorrentParams.ti = std::const_pointer_cast<lt::torrent_info>(m_nativeHandle.torrent_file());
|
||||
reload();
|
||||
updateStatus();
|
||||
return;
|
||||
@@ -1399,6 +1555,7 @@ void TorrentImpl::resume(const TorrentOperatingMode mode)
|
||||
m_nativeHandle.unset_flags(lt::torrent_flags::stop_when_ready);
|
||||
|
||||
m_isStopped = false;
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentResumed(this);
|
||||
}
|
||||
|
||||
@@ -1434,6 +1591,7 @@ void TorrentImpl::handleStateUpdate(const lt::torrent_status &nativeStatus)
|
||||
|
||||
void TorrentImpl::handleMoveStorageJobFinished(const bool hasOutstandingJob)
|
||||
{
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_storageIsMoving = hasOutstandingJob;
|
||||
|
||||
updateStatus();
|
||||
@@ -1444,10 +1602,21 @@ void TorrentImpl::handleMoveStorageJobFinished(const bool hasOutstandingJob)
|
||||
m_session->handleTorrentSavePathChanged(this);
|
||||
}
|
||||
|
||||
saveResumeData();
|
||||
if (!m_storageIsMoving)
|
||||
{
|
||||
if (m_hasMissingFiles)
|
||||
{
|
||||
// it can be moved to the proper location
|
||||
m_hasMissingFiles = false;
|
||||
m_ltAddTorrentParams.save_path = m_nativeStatus.save_path;
|
||||
m_ltAddTorrentParams.ti = std::const_pointer_cast<lt::torrent_info>(m_nativeHandle.torrent_file());
|
||||
reload();
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
while ((m_renameCount == 0) && !m_moveFinishedTriggers.isEmpty())
|
||||
m_moveFinishedTriggers.takeFirst()();
|
||||
while ((m_renameCount == 0) && !m_moveFinishedTriggers.isEmpty())
|
||||
m_moveFinishedTriggers.takeFirst()();
|
||||
}
|
||||
}
|
||||
|
||||
void TorrentImpl::handleTrackerReplyAlert(const lt::tracker_reply_alert *p)
|
||||
@@ -1484,9 +1653,9 @@ void TorrentImpl::handleTrackerErrorAlert(const lt::tracker_error_alert *p)
|
||||
const QVector<TrackerEntry> trackerList = trackers();
|
||||
const auto iter = std::find_if(trackerList.cbegin(), trackerList.cend(), [&trackerUrl](const TrackerEntry &entry)
|
||||
{
|
||||
return (entry.url() == trackerUrl);
|
||||
return (entry.url == trackerUrl);
|
||||
});
|
||||
if ((iter != trackerList.cend()) && (iter->status() == TrackerEntry::NotWorking))
|
||||
if ((iter != trackerList.cend()) && (iter->status == TrackerEntry::NotWorking))
|
||||
m_session->handleTorrentTrackerError(this, trackerUrl);
|
||||
}
|
||||
|
||||
@@ -1503,7 +1672,8 @@ void TorrentImpl::handleTorrentCheckedAlert(const lt::torrent_checked_alert *p)
|
||||
return;
|
||||
}
|
||||
|
||||
saveResumeData();
|
||||
if (m_nativeHandle.need_save_resume_data())
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
|
||||
if (m_fastresumeDataRejected && !m_hasMissingFiles)
|
||||
m_fastresumeDataRejected = false;
|
||||
@@ -1538,6 +1708,8 @@ void TorrentImpl::handleTorrentFinishedAlert(const lt::torrent_finished_alert *p
|
||||
adjustActualSavePath();
|
||||
manageIncompleteFiles();
|
||||
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
|
||||
const bool recheckTorrentsOnCompletion = Preferences::instance()->recheckTorrentsOnCompletion();
|
||||
if (isMoveInProgress() || (m_renameCount > 0))
|
||||
{
|
||||
@@ -1565,35 +1737,28 @@ void TorrentImpl::handleTorrentResumedAlert(const lt::torrent_resumed_alert *p)
|
||||
|
||||
void TorrentImpl::handleSaveResumeDataAlert(const lt::save_resume_data_alert *p)
|
||||
{
|
||||
if (!m_hasMissingFiles)
|
||||
if (m_hasMissingFiles)
|
||||
{
|
||||
const auto havePieces = m_ltAddTorrentParams.have_pieces;
|
||||
const auto unfinishedPieces = m_ltAddTorrentParams.unfinished_pieces;
|
||||
const auto verifiedPieces = m_ltAddTorrentParams.verified_pieces;
|
||||
|
||||
// Update recent resume data but preserve existing progress
|
||||
m_ltAddTorrentParams = p->params;
|
||||
m_ltAddTorrentParams.have_pieces = havePieces;
|
||||
m_ltAddTorrentParams.unfinished_pieces = unfinishedPieces;
|
||||
m_ltAddTorrentParams.verified_pieces = verifiedPieces;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Update recent resume data
|
||||
m_ltAddTorrentParams = p->params;
|
||||
}
|
||||
|
||||
if (m_isStopped)
|
||||
{
|
||||
m_ltAddTorrentParams.flags |= lt::torrent_flags::paused;
|
||||
m_ltAddTorrentParams.flags &= ~lt::torrent_flags::auto_managed;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Torrent can be actually "running" but temporarily "paused" to perform some
|
||||
// service jobs behind the scenes so we need to restore it as "running"
|
||||
if (m_operatingMode == TorrentOperatingMode::AutoManaged)
|
||||
{
|
||||
m_ltAddTorrentParams.flags |= lt::torrent_flags::auto_managed;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ltAddTorrentParams.flags &= ~lt::torrent_flags::paused;
|
||||
m_ltAddTorrentParams.flags &= ~lt::torrent_flags::auto_managed;
|
||||
}
|
||||
}
|
||||
|
||||
m_ltAddTorrentParams.added_time = addedTime().toSecsSinceEpoch();
|
||||
m_ltAddTorrentParams.save_path = Profile::instance()->toPortablePath(
|
||||
QString::fromStdString(m_ltAddTorrentParams.save_path)).toStdString();
|
||||
|
||||
// We shouldn't save upload_mode flag to allow torrent operate normally on next run
|
||||
m_ltAddTorrentParams.flags &= ~lt::torrent_flags::upload_mode;
|
||||
|
||||
if (m_maintenanceJob == MaintenanceJob::HandleMetadata)
|
||||
{
|
||||
@@ -1606,37 +1771,21 @@ void TorrentImpl::handleSaveResumeDataAlert(const lt::save_resume_data_alert *p)
|
||||
m_session->findIncompleteFiles(metadata, m_savePath);
|
||||
}
|
||||
|
||||
auto resumeDataPtr = std::make_shared<lt::entry>(lt::write_resume_data(m_ltAddTorrentParams));
|
||||
lt::entry &resumeData = *resumeDataPtr;
|
||||
LoadTorrentParams resumeData;
|
||||
resumeData.name = m_name;
|
||||
resumeData.category = m_category;
|
||||
resumeData.savePath = m_useAutoTMM ? "" : m_savePath;
|
||||
resumeData.tags = m_tags;
|
||||
resumeData.contentLayout = m_contentLayout;
|
||||
resumeData.ratioLimit = m_ratioLimit;
|
||||
resumeData.seedingTimeLimit = m_seedingTimeLimit;
|
||||
resumeData.firstLastPiecePriority = m_hasFirstLastPiecePriority;
|
||||
resumeData.hasSeedStatus = m_hasSeedStatus;
|
||||
resumeData.paused = m_isStopped;
|
||||
resumeData.forced = (m_operatingMode == TorrentOperatingMode::Forced);
|
||||
resumeData.ltAddTorrentParams = m_ltAddTorrentParams;
|
||||
|
||||
// TODO: The following code is deprecated. Remove after several releases in 4.3.x.
|
||||
// === BEGIN DEPRECATED CODE === //
|
||||
const bool useDummyResumeData = !hasMetadata();
|
||||
if (useDummyResumeData)
|
||||
{
|
||||
updateStatus();
|
||||
|
||||
resumeData["qBt-magnetUri"] = createMagnetURI().toStdString();
|
||||
// sequentialDownload needs to be stored in the
|
||||
// resume data if there is no metadata, otherwise they won't be
|
||||
// restored if qBittorrent quits before the metadata are retrieved:
|
||||
resumeData["qBt-sequential"] = isSequentialDownload();
|
||||
|
||||
resumeData["qBt-addedTime"] = addedTime().toSecsSinceEpoch();
|
||||
}
|
||||
// === END DEPRECATED CODE === //
|
||||
|
||||
resumeData["qBt-savePath"] = m_useAutoTMM ? "" : Profile::instance()->toPortablePath(m_savePath).toStdString();
|
||||
resumeData["qBt-ratioLimit"] = static_cast<int>(m_ratioLimit * 1000);
|
||||
resumeData["qBt-seedingTimeLimit"] = m_seedingTimeLimit;
|
||||
resumeData["qBt-category"] = m_category.toStdString();
|
||||
resumeData["qBt-tags"] = setToEntryList(m_tags);
|
||||
resumeData["qBt-name"] = m_name.toStdString();
|
||||
resumeData["qBt-seedStatus"] = m_hasSeedStatus;
|
||||
resumeData["qBt-contentLayout"] = Utils::String::fromEnum(m_contentLayout).toStdString();
|
||||
resumeData["qBt-firstLastPiecePriority"] = m_hasFirstLastPiecePriority;
|
||||
|
||||
m_session->handleTorrentResumeDataReady(this, resumeDataPtr);
|
||||
m_session->handleTorrentResumeDataReady(this, resumeData);
|
||||
}
|
||||
|
||||
void TorrentImpl::handleSaveResumeDataFailedAlert(const lt::save_resume_data_failed_alert *p)
|
||||
@@ -1702,8 +1851,7 @@ void TorrentImpl::handleFileRenamedAlert(const lt::file_renamed_alert *p)
|
||||
while (!isMoveInProgress() && (m_renameCount == 0) && !m_moveFinishedTriggers.isEmpty())
|
||||
m_moveFinishedTriggers.takeFirst()();
|
||||
|
||||
if (isPaused() && (m_renameCount == 0))
|
||||
saveResumeData(); // otherwise the new path will not be saved
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
}
|
||||
|
||||
void TorrentImpl::handleFileRenameFailedAlert(const lt::file_rename_failed_alert *p)
|
||||
@@ -1720,8 +1868,7 @@ void TorrentImpl::handleFileRenameFailedAlert(const lt::file_rename_failed_alert
|
||||
while (!isMoveInProgress() && (m_renameCount == 0) && !m_moveFinishedTriggers.isEmpty())
|
||||
m_moveFinishedTriggers.takeFirst()();
|
||||
|
||||
if (isPaused() && (m_renameCount == 0))
|
||||
saveResumeData(); // otherwise the new path will not be saved
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
}
|
||||
|
||||
void TorrentImpl::handleFileCompletedAlert(const lt::file_completed_alert *p)
|
||||
@@ -1743,11 +1890,10 @@ void TorrentImpl::handleFileCompletedAlert(const lt::file_completed_alert *p)
|
||||
void TorrentImpl::handleMetadataReceivedAlert(const lt::metadata_received_alert *p)
|
||||
{
|
||||
Q_UNUSED(p);
|
||||
|
||||
qDebug("Metadata received for torrent %s.", qUtf8Printable(name()));
|
||||
|
||||
m_maintenanceJob = MaintenanceJob::HandleMetadata;
|
||||
saveResumeData();
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
}
|
||||
|
||||
void TorrentImpl::handlePerformanceAlert(const lt::performance_alert *p) const
|
||||
@@ -1945,6 +2091,7 @@ void TorrentImpl::setRatioLimit(qreal limit)
|
||||
if (m_ratioLimit != limit)
|
||||
{
|
||||
m_ratioLimit = limit;
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentShareLimitChanged(this);
|
||||
}
|
||||
}
|
||||
@@ -1959,6 +2106,7 @@ void TorrentImpl::setSeedingTimeLimit(int limit)
|
||||
if (m_seedingTimeLimit != limit)
|
||||
{
|
||||
m_seedingTimeLimit = limit;
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentShareLimitChanged(this);
|
||||
}
|
||||
}
|
||||
@@ -1969,7 +2117,7 @@ void TorrentImpl::setUploadLimit(const int limit)
|
||||
return;
|
||||
|
||||
m_nativeHandle.set_upload_limit(limit);
|
||||
saveResumeData();
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
}
|
||||
|
||||
void TorrentImpl::setDownloadLimit(const int limit)
|
||||
@@ -1978,7 +2126,7 @@ void TorrentImpl::setDownloadLimit(const int limit)
|
||||
return;
|
||||
|
||||
m_nativeHandle.set_download_limit(limit);
|
||||
saveResumeData();
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
}
|
||||
|
||||
void TorrentImpl::setSuperSeeding(const bool enable)
|
||||
@@ -1990,7 +2138,8 @@ void TorrentImpl::setSuperSeeding(const bool enable)
|
||||
m_nativeHandle.set_flags(lt::torrent_flags::super_seeding);
|
||||
else
|
||||
m_nativeHandle.unset_flags(lt::torrent_flags::super_seeding);
|
||||
saveResumeData();
|
||||
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
}
|
||||
|
||||
void TorrentImpl::setDHTDisabled(const bool disable)
|
||||
@@ -2002,7 +2151,8 @@ void TorrentImpl::setDHTDisabled(const bool disable)
|
||||
m_nativeHandle.set_flags(lt::torrent_flags::disable_dht);
|
||||
else
|
||||
m_nativeHandle.unset_flags(lt::torrent_flags::disable_dht);
|
||||
saveResumeData();
|
||||
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
}
|
||||
|
||||
void TorrentImpl::setPEXDisabled(const bool disable)
|
||||
@@ -2014,7 +2164,8 @@ void TorrentImpl::setPEXDisabled(const bool disable)
|
||||
m_nativeHandle.set_flags(lt::torrent_flags::disable_pex);
|
||||
else
|
||||
m_nativeHandle.unset_flags(lt::torrent_flags::disable_pex);
|
||||
saveResumeData();
|
||||
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
}
|
||||
|
||||
void TorrentImpl::setLSDDisabled(const bool disable)
|
||||
@@ -2026,7 +2177,8 @@ void TorrentImpl::setLSDDisabled(const bool disable)
|
||||
m_nativeHandle.set_flags(lt::torrent_flags::disable_lsd);
|
||||
else
|
||||
m_nativeHandle.unset_flags(lt::torrent_flags::disable_lsd);
|
||||
saveResumeData();
|
||||
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
}
|
||||
|
||||
void TorrentImpl::flushCache() const
|
||||
|
||||
@@ -68,7 +68,6 @@ namespace BitTorrent
|
||||
bool forced = false;
|
||||
bool paused = false;
|
||||
|
||||
|
||||
qreal ratioLimit = Torrent::USE_GLOBAL_RATIO;
|
||||
int seedingTimeLimit = Torrent::USE_GLOBAL_SEEDING_TIME;
|
||||
|
||||
@@ -99,7 +98,7 @@ namespace BitTorrent
|
||||
|
||||
bool isValid() const;
|
||||
|
||||
InfoHash hash() const override;
|
||||
InfoHash infoHash() const override;
|
||||
QString name() const override;
|
||||
QDateTime creationDate() const override;
|
||||
QString creator() const override;
|
||||
@@ -301,7 +300,7 @@ namespace BitTorrent
|
||||
TorrentInfo m_torrentInfo;
|
||||
SpeedMonitor m_speedMonitor;
|
||||
|
||||
InfoHash m_hash;
|
||||
InfoHash m_infoHash;
|
||||
|
||||
// m_moveFinishedTriggers is activated only when the following conditions are met:
|
||||
// all file rename jobs complete, all file move jobs complete
|
||||
|
||||
@@ -184,10 +184,15 @@ bool TorrentInfo::isValid() const
|
||||
return (m_nativeInfo && m_nativeInfo->is_valid() && (m_nativeInfo->num_files() > 0));
|
||||
}
|
||||
|
||||
InfoHash TorrentInfo::hash() const
|
||||
InfoHash TorrentInfo::infoHash() const
|
||||
{
|
||||
if (!isValid()) return {};
|
||||
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
return m_nativeInfo->info_hashes();
|
||||
#else
|
||||
return m_nativeInfo->info_hash();
|
||||
#endif
|
||||
}
|
||||
|
||||
QString TorrentInfo::name() const
|
||||
@@ -302,7 +307,7 @@ QVector<TrackerEntry> TorrentInfo::trackers() const
|
||||
ret.reserve(trackers.size());
|
||||
|
||||
for (const lt::announce_entry &tracker : trackers)
|
||||
ret.append(tracker);
|
||||
ret.append({QString::fromStdString(tracker.url)});
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -374,7 +379,7 @@ QVector<QByteArray> TorrentInfo::pieceHashes() const
|
||||
hashes.reserve(count);
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
hashes += {m_nativeInfo->hash_for_piece_ptr(lt::piece_index_t {i}), InfoHash::length()};
|
||||
hashes += {m_nativeInfo->hash_for_piece_ptr(lt::piece_index_t {i}), SHA1Hash::length()};
|
||||
|
||||
return hashes;
|
||||
}
|
||||
@@ -481,9 +486,13 @@ void TorrentInfo::stripRootFolder()
|
||||
|
||||
void TorrentInfo::addRootFolder()
|
||||
{
|
||||
const QString rootFolder = name();
|
||||
Q_ASSERT(!rootFolder.isEmpty());
|
||||
const QString originalName = name();
|
||||
Q_ASSERT(!originalName.isEmpty());
|
||||
|
||||
const QString extension = Utils::Fs::fileExtension(originalName);
|
||||
const QString rootFolder = extension.isEmpty()
|
||||
? originalName
|
||||
: originalName.chopped(extension.size() + 1);
|
||||
const std::string rootPrefix = Utils::Fs::toNativePath(rootFolder + QLatin1Char {'/'}).toStdString();
|
||||
lt::file_storage files = m_nativeInfo->files();
|
||||
files.set_name(rootFolder.toStdString());
|
||||
|
||||
@@ -45,7 +45,7 @@ class QUrl;
|
||||
namespace BitTorrent
|
||||
{
|
||||
class InfoHash;
|
||||
class TrackerEntry;
|
||||
struct TrackerEntry;
|
||||
|
||||
class TorrentInfo final : public AbstractFileStorage
|
||||
{
|
||||
@@ -62,7 +62,7 @@ namespace BitTorrent
|
||||
TorrentInfo &operator=(const TorrentInfo &other);
|
||||
|
||||
bool isValid() const;
|
||||
InfoHash hash() const;
|
||||
InfoHash infoHash() const;
|
||||
QString name() const;
|
||||
QDateTime creationDate() const;
|
||||
QString creator() const;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user