Commit graph

476 commits

Author SHA1 Message Date
Vladimir Golovnev (Glassez)
ae44e59c9a
Wrap "resume data" in LoadTorrentParams 2021-03-23 22:26:55 +02:00
Vladimir Golovnev (Glassez)
1de52f9bcf
Drop deprecated code 2021-03-23 22:26:54 +02:00
Vladimir Golovnev (Glassez)
44b94803a4
Improve "save resume data" handling 2021-03-23 22:26:35 +02:00
Vladimir Golovnev (Glassez)
265da50791
Don't use deprecated features 2021-03-23 22:26:28 +02:00
Vladimir Golovnev (Glassez)
4037143f4e
Raise minimum supported Qt version to 5.12 2021-03-23 22:26:26 +02:00
Vladimir Golovnev (Glassez)
437b51b3a5
Improve "info hash" handling
Define "torrent ID" concept, which is either a SHA1 hash for torrents of version 1,
or a SHA256 hash (truncated to SHA1 hash length) for torrents of version 2.
Add support for native libtorrent2 info hashes.
2021-03-23 22:26:18 +02:00
Vladimir Golovnev (Glassez)
b2c7d8211f
Improve tracker entries handling 2021-03-23 22:26:14 +02:00
Chocobo1
d0ec1c4a86
Expose ToS setting from libtorrent
Closes #14420.
2021-03-23 22:26:08 +02:00
Vladimir Golovnev (Glassez)
f16c585a77
Drop implicit conversions between InfoHash and QString 2021-03-23 21:05:40 +02:00
Vladimir Golovnev (Glassez)
2d607f8c1a
Raise minimum libtorrent version to 1.2.12 2021-03-23 21:05:34 +02:00
Chocobo1
58345e5bbf
Revise getter function for torrrent queue position
This addresses https://github.com/qbittorrent/qBittorrent/pull/14335#issuecomment-774667836

The WebAPI is not affected as a workaround is added.
2021-03-23 21:05:21 +02:00
dyumin
a454a0303d
Treat errored torrents as finished 2021-03-23 21:05:11 +02:00
an0n666
230f98da4a
Validate HTTPS Tracker Certificate by default 2021-03-23 21:04:56 +02:00
Vladimir Golovnev (Glassez)
1880082017
Remove redundant suffix from TorrentHandle class
Originally, it was just a wrapper for libtorrent::torrent_handle class, so it mimicked its name.
It was then transformed into a more complex aggregate, but the name was retained (just by inertia).
Unlike libtorrent::torrent_handle class in whose name "handle" means the pattern used,
it does not matter for qBittorrent classes and just eats up space in the source code.
2021-01-17 22:47:00 +02:00
Chocobo1
77f4e6c2cf
Generate version header when configuring project
The basic idea is we create a version header template at
"src/base/version.h.in" and the build systems are expected to replace
strings that are enclosed with @ symbols and generate
"src/base/version.h" for other source files to consume/include.
2021-01-06 21:36:39 +02:00
Vladimir Golovnev (Glassez)
58ac07667e
Use single parameter to accept torrent source 2021-01-06 21:36:34 +02:00
Vladimir Golovnev (Glassez)
74bf3af41c
Use std::optional<bool> instead of custom TriStateBool 2021-01-06 21:36:33 +02:00
Vladimir Golovnev (Glassez)
dab32f2090
Use std::optional instead of boost::optional 2021-01-06 21:36:29 +02:00
Vladimir Golovnev (Glassez)
e55582124c
Drop notification about move storage failed 2021-01-06 21:36:17 +02:00
Vladimir Golovnev (Glassez)
bd8b06c607
Drop notification about move storage finished 2021-01-06 21:36:16 +02:00
Chocobo1
ec420f6617
Bump project requirement to C++17 2021-01-06 21:31:47 +02:00
Chocobo1
d908227619
Add a thin layer around SettingsStorage class
This new layer would be handy for saving GUI widget states as they don't
need the value cached and they store/load rarely.
2021-01-06 21:31:45 +02:00
Vladimir Golovnev (Glassez)
c08ec1ac5e
Allow to add root folder to torrent content 2020-12-26 20:27:34 +02:00
Vladimir Golovnev (Glassez)
b8f1142abe
Improve torrent name handling 2020-12-26 20:27:31 +02:00
Chocobo1
78859415d6
Use a helper function to look up stat indexes 2020-12-26 20:27:29 +02:00
Chocobo1
ef92c17192
Don't use removed stat metric in libtorrent 2.0
For now, the metric is not entirely removed due to WebAPI still needs to
access it.
2020-12-26 20:27:28 +02:00
Vladimir Golovnev (Glassez)
2c2bb14b2a
Fix bug of "move storage job" can be performed multiple times 2020-12-26 20:27:16 +02:00
Chocobo1
0b42425db5
Add support for allow_idna option
Upstream PR: https://github.com/arvidn/libtorrent/pull/5316
2020-12-26 20:27:08 +02:00
Vladimir Golovnev (Glassez)
926012ce71
Fix bug of torrents don't save "stopped" state 2020-12-26 20:27:00 +02:00
Vladimir Golovnev (Glassez)
5f34d1555b
Fix received metadata handling 2020-12-26 20:26:54 +02:00
Vladimir Golovnev
f94f4d2391
Drop support for building with libtorrent < 1.2.11
Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
2020-12-26 20:26:52 +02:00
FranciscoPombal
817e9c4747
Fix method invocation on Qt < 5.10
Fixup 0c3fe54b0b
2020-12-26 20:26:48 +02:00
Vladimir Golovnev (Glassez)
28844eff44
Search for existing files in separate thread 2020-12-26 20:26:47 +02:00
Vladimir Golovnev (Glassez)
953b6fd6f8
Properly handle "Append extension" option changing 2020-12-26 20:26:45 +02:00
Vladimir Golovnev (Glassez)
9b4f3fcbf8
Clean up metadata downloading code 2020-12-26 20:26:43 +02:00
sledgehammer999
894446d308
Don't try to remove folders for a torrent without metadata 2020-12-26 20:26:34 +02:00
Vladimir Golovnev (Glassez)
1728c16580
Improve coding style 2020-11-24 16:14:14 +02:00
Vladimir Golovnev (Glassez)
3edaaa30c9
Handle torrent "paused" state at application level 2020-11-24 16:14:04 +02:00
NotTsunami
88a90ed7d4
Fix mingw64 build error
mingw64 defines interface, so revert back to previous naming scheme

Fixes: 87864531ab
Closes #13649
2020-11-24 16:13:51 +02:00
Vladimir Golovnev (Glassez)
9171dffe97
Prevent resume data to be saved for removed torrent 2020-11-24 16:13:25 +02:00
Vladimir Golovnev
720c1c8216
Merge pull request #13395 from glassez/disk_io
Implement disk IO thread wrapper
2020-10-17 12:53:25 +03:00
Anton Bershanskiy
b4bfdd6f7a Add option for hashing_threads, use 10 asyc IO threads
Add option for setting lt::settings_pack::hashing_threads
introduced by libtorrent 2.0. It has no effect for earlier
libtorrent versions.
Use 10 async IO threads, as per #11461.
Closes #11461.
2020-10-13 00:58:13 +03:00
FranciscoPombal
deffdbe881 Change some types (uint -> int) in Session class 2020-10-07 23:26:13 +01:00
FranciscoPombal
87864531ab Clean up in Session class 2020-10-07 23:26:13 +01:00
Chocobo1
ac3ab2432a
Remove redundant namespace prefix 2020-09-25 15:10:20 +08:00
Mike Tzou
c3b5668a07
Merge pull request #12577 from NotTsunami/peer
Allow users to configure no_connect_privileged_ports
2020-09-22 00:02:20 +08:00
NotTsunami
2eb3ff7f06 Allow users to configure no_connect_privileged_ports
Don't hardcode lt::settings_pack::no_connect_privileged_ports. We
support the peer alert for it already, so connections blocked by this
setting should be logged.
2020-09-20 22:46:28 -04:00
Vladimir Golovnev (Glassez)
39d32063c1
Implement disk IO thread wrapper 2020-09-18 15:56:29 +03:00
Vladimir Golovnev (Glassez)
ff36356be0
Improve sequentialDownload/firstLastPiecePriority handling
Always store firstLastPiecePriority in resume data.
Don't recalculate firstLastPiecePriority value each time it is accessed.
Always store sequentialDownload in resume data as native libtorrent field.
2020-09-18 13:33:55 +03:00
FranciscoPombal
e0c62827a8 Fix peer blocked message 2020-09-16 16:59:51 +01:00