FranciscoPombal
af6f63f82c
Don't use IPv4-mapped IPv6
...
Always register peers with either IPv4 or IPv6.
Fixes potential connection issues.
Also clarify related BEP-24 support.
2020-02-26 20:44:09 +00:00
FranciscoPombal
abc69dfd20
Fix BEP-23 support
...
The embedded tracker was returning a non-compliant response.
The peer lists should be packed strings instead of lists.
Also clarify level of compliance with BEP-7.
2020-02-26 20:42:14 +00:00
FranciscoPombal
9f045500d1
Fix IPv6 endianness
2020-02-26 20:42:07 +00:00
Vladimir Golovnev (Glassez)
e4ff206e3c
Move torrent storages one by one
2020-02-26 10:20:04 +03:00
Vladimir Golovnev (Glassez)
dd0cee44c1
Allow to save downloaded metadata as torrent file
2020-02-26 08:10:11 +03:00
FranciscoPombal
dc6a56afcb
Revert using random port by default
...
Revert change introduced in https://github.com/qbittorrent/qBittorrent/pull/11637 and also revert the associated follow-up https://github.com/qbittorrent/qBittorrent/pull/12000 .
Reason: https://github.com/arvidn/libtorrent/pull/4335
2020-02-21 14:47:37 +00:00
sledgehammer999
193da7f2f9
Merge pull request #12014 from sledgehammer999/alt_IP_db_provider
...
Use IP geolocation database by DB-IP instead of MaxMind
2020-02-18 17:05:52 +02:00
sledgehammer999
ea1481beef
Use IP geolocation database by DB-IP instead of MaxMind
...
Closes #11792
2020-02-18 16:11:28 +02:00
Mike Tzou
bf6a88b3d2
Merge pull request #12021 from Chocobo1/trackerentry
...
Simplify TrackerEntry::status() logic
2020-02-18 02:22:05 +08:00
Chocobo1
e825473289
Simplify TrackerEntry::status() logic
2020-02-17 18:46:30 +08:00
sledgehammer999
322ae3e0bc
Merge pull request #11825 from FranciscoPombal/stalled_filter
...
Add stalled filters to GUI and Web API/UI
2020-02-16 18:32:37 +02:00
Mike Tzou
04132f6266
Merge pull request #11999 from an0n666/fix-not-contacted-tracker
...
Do not list not contacted trackers as error
2020-02-16 20:27:41 +08:00
an0n666
8423f43209
Do not list not contacted trackers as error
2020-02-15 19:44:14 +00:00
sledgehammer999
385d7247b7
Merge pull request #12016 from Chocobo1/errMsg
...
Include resume folder path in exception message
2020-02-15 19:41:39 +02:00
Vladimir Golovnev
362305f339
Merge pull request #12013 from glassez/fix-rss
...
Don't access download handler after it's finished
2020-02-15 07:02:59 +03:00
Mike Tzou
dbea2d95f9
Merge pull request #12004 from Chocobo1/authCount
...
Add configurable ban options for WebUI
2020-02-15 09:43:16 +08:00
Chocobo1
45c357dfe2
Include resume folder path in exception message
...
The message in RuntimeError exception will be displayed to the users and
users would be clueless if we don't show the path.
2020-02-15 02:48:55 +08:00
Chocobo1
6eb190c373
Expose WebUI ban duration to users
2020-02-14 16:23:30 +08:00
Vladimir Golovnev (Glassez)
3762514662
Don't access download handler after it's finished
2020-02-14 08:24:49 +03:00
Chocobo1
f88d6b2e55
Expose WebUI ban counter to users
2020-02-14 12:31:12 +08:00
Tester798
58711cbe7e
Fix portable mode
...
Try to fix portable mode bug. Closes #11706 , #11178 , #7765 .
2020-02-12 19:56:25 +02:00
Mike Tzou
316f34cbf5
Merge pull request #11994 from Chocobo1/profile
...
Unify singleton pattern in Profile class
2020-02-12 23:59:47 +08:00
Chocobo1
5de75eff05
Unify singleton pattern in Profile class
...
1. Use unified function names `initInstance()` and `freeInstance()` and
make them public.
2. Add `freeInstance()` to avoid noise from memory leak detectors.
3. Let `instance()`return a pointer directly to avoid unnecessary
indirections when invoking functions.
2020-02-11 15:30:59 +08:00
Vladimir Golovnev (Glassez)
8bb34482ea
Handle HTTP redirections manually
...
Qt doesn't support Magnet protocol so we need to handle all redirections
manually to allow redirections to Magnet URIs.
2020-02-11 09:31:42 +03:00
Chocobo1
baa13c044a
Drop python2 support
...
Closes #11811 .
2020-02-08 12:36:45 +08:00
Chocobo1
a6cdba17f0
Fix singleton class ownership
...
We shouldn't allow Qt parent ownership in here.
2020-02-07 15:34:04 +08:00
NotTsunami
6748e8d787
Remove redundant null checks
...
Attempting to delete a null pointer is a noop in C++.
Closes #2864 .
[1] https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null
2020-02-03 16:38:51 -05:00
Chocobo1
b2ab6c1858
Let ReverseResolution always return/emit a result
2020-01-30 19:24:18 +08:00
Chocobo1
a2ebd77eac
Manually abort lookup on class destruction
...
Some lookup might take longer so instead of waiting them, we abort them
manually.
2020-01-30 14:11:03 +08:00
Chocobo1
86e3d0d816
Improve ReverseResolution class
...
* Use QHostAddress type for IP
* Avoid double lookup
* Use larger cache size
2020-01-30 14:11:03 +08:00
Mike Tzou
11bea8d393
Merge pull request #11918 from thalieht/peerssameip
...
Show any multiple connections from the same IP in peer list
2020-01-30 12:59:17 +08:00
thalieht
5f415c292d
Show any multiple connections from the same IP in peer list
...
The uniqueness of peers is now determined by their
IP, port and connection type (uTP etc.) instead of just their IP
2020-01-29 20:40:10 +02:00
Chocobo1
5905c085c6
Use systematic approach to generate hash
...
The basic idea is to hash each class member and then mix them with xor
operation.
However the `seed` must be handled with care, it should only be
introduced once when mixing the hashes of each class member, otherwise
under some circumstances the `seed` might xor with itself and thus break
the intended effect.
2020-01-27 18:14:27 +08:00
Chocobo1
1740f968df
Revise qHash function
...
Instead of xor and narrowing the integers ourselves, now we let qHash()
from Qt do the job properly.
2020-01-27 12:53:22 +08:00
Chocobo1
2b4490d8a7
Use faster hash function
...
qHash(QString) will need to hash/loop through all the data while the new
code will only need one memcpy() and a few bit manipulations.
2020-01-27 12:53:13 +08:00
Vladimir Golovnev
89e72b38ea
Merge pull request #11881 from glassez/extension
...
Simplify torrent startup handling
2020-01-22 06:11:33 +03:00
Vladimir Golovnev (Glassez)
f2285e1b63
Redesign torrent startup handling
2020-01-21 10:14:59 +03:00
Chocobo1
3fce1db2eb
Migrate away from deprecated settings
...
Libtorrent has deprecated `upnp_ignore_nonrouters` in
https://github.com/arvidn/libtorrent/pull/4251
2020-01-16 23:44:54 +08:00
Mike Tzou
146e8213a5
Merge pull request #11781 from FranciscoPombal/piece_extent_affinity
...
Add piece_extent_affinity to AdvancedSettings
2020-01-14 12:53:39 +08:00
FranciscoPombal
f4742a98c5
Add stalled filters to GUI and Web API/UI
...
`/api/v2/torrents/info` can now take the following new values for the`filter` parameter: `stalled`, `stalled_uploading` and `stalled_downloading`.
Requires Web API version bump.
Closes #11787
2020-01-13 11:41:37 +00:00
FranciscoPombal
ed96a07a75
Add piece_extent_affinity to AdvancedSettings
...
Expose option in WebUI settings and WebAPI.
Requires WebAPI version bump.
Closes #11436 .
2020-01-13 00:11:29 +00:00
An0n
bf32e90c40
Change placement of stop tracker timeout
2020-01-09 19:01:05 +00:00
Mike Tzou
057860584c
Merge pull request #11834 from an0n666/an0n666-expose-stop-tracker-timeout
...
Expose stop tracker timeout in Advanced Settings (GUI + WebUI)
2020-01-08 17:30:21 +08:00
an0n666
3f223c3a45
Expose stop_tracker_timeout in advanced settings
2020-01-08 08:21:55 +00:00
sledgehammer999
02a027144b
Tracker is errored only if all local endpoints fail
...
Closes #11691
2020-01-05 17:59:54 +02:00
Vladimir Golovnev (Glassez)
f56f817c77
Save resume data after recheck
...
Closes #11774 .
2020-01-01 14:29:58 +03:00
Mike Tzou
5c3c1e07df
Merge pull request #11739 from Chocobo1/qt5_14
...
Migrate away from deprecated API in Qt 5.14
2019-12-26 12:43:04 +08:00
Chocobo1
2422d81de1
Migrate away from deprecated API in Qt 5.14
2019-12-25 19:23:37 +08:00
Mike Tzou
fea39fbcf2
Merge pull request #11726 from FranciscoPombal/fix_#11724
...
WebUI: Implement "Secure" flag for session cookie. Closes #11724
2019-12-25 13:06:40 +08:00
Mike Tzou
c94417b589
Merge pull request #11637 from FranciscoPombal/new_defaults
...
Change some settings defaults for better behaviour out of the box
2019-12-24 12:27:11 +08:00
FranciscoPombal
691d5e5d89
WebUI: Implement "Secure" flag for session cookie
...
Closes #11724 .
Option is enabled by default for users using qBittorrent's built-in HTTPS capabilities. This flag will never be set if qBittorrent is using plain HTTP.
Users using HTTPS reverse proxies, like "qbt <-> (http) <-> proxy <-> (https) <-> user" should override the flag in the proxy in order to set it, if they wish to do so.
2019-12-23 17:58:08 +00:00
sledgehammer999
3a70dd4438
Merge pull request #11672 from sledgehammer999/show_console
...
Option to show console when external program is run
2019-12-23 16:16:24 +02:00
sledgehammer999
1121316926
Delete unnecessary explicit return
2019-12-19 19:13:02 +02:00
sledgehammer999
8fa6e372a2
Option to show console when external program is run
...
Windows only.
Closes #9592
2019-12-19 19:13:01 +02:00
FranciscoPombal
30502de960
Change some settings defaults for better behaviour out of the box
...
- CheckingMemUsageSize (16 MiB -> 32 MiB): a 16 MiB increase in memory consumption seems worthwhile for a nice performance boost in most cases.
- DiskCacheSize (64 MiB -> Auto): auto yields the best performance without committing to a huge fixed value.
- UseRandomPort (false -> true): The initial port chosen by qBittorrent may clash with something else the user already has that is aways using that port (low probability, but still). Thus, qBittorrent will always fail listening on that port, causing unexpected problems for the user. Users who know they want a fixed port will go to the settings anyway.
2019-12-19 16:46:22 +00:00
sledgehammer999
18de63f743
Merge pull request #11433 from jagannatharjun/colors
...
Allow transfer list text color changes through QSS
2019-12-19 18:20:49 +02:00
Prince Gupta
d3aa45526a
Allow transfer list text color changes through QSS
2019-12-19 12:45:26 +05:30
Mike Tzou
1e4c837d6c
Merge pull request #11678 from an0n666/patch-1
...
Disable Torrent Queue by default
2019-12-18 13:47:04 +08:00
sledgehammer999
90308c2ae5
Merge pull request #11660 from sledgehammer999/fix_smart_delete
...
Don't unnecessarily delete folder customization
2019-12-17 20:38:25 +02:00
sledgehammer999
3d43f1c800
Merge pull request #11642 from sledgehammer999/fix_save_path
...
Use the incomplete folder where appropriate
2019-12-17 20:37:57 +02:00
sledgehammer999
64e5d41a2c
Don't unnecessarily delete OS files in folders
2019-12-16 22:10:13 +02:00
an0n666
e0d7876990
Disable Torrent Queue by default
...
It should remain disabled by default. Anyone that needs to Queue torrents for seeding/downloading should go to settings and change it to their preference.
2019-12-16 18:16:27 +06:00
sledgehammer999
564d845d87
Use the incomplete folder where appropriate
...
Restored torrents already have the correct path saved in their fastresume. Don't override it.
Magnets and new torrents have to be set explicitly to the incomplete folder if it is enabled.
Closes #11552
2019-12-13 20:31:38 +02:00
sledgehammer999
d09c5e529c
Merge pull request #11592 from sledgehammer999/refactor_listeningAddr
...
Rework the listening IP/interface selection code
2019-12-12 20:24:45 +02:00
Chocobo1
796595ffb6
Enable "Apply rate limit to peers on LAN" option by default
...
Because some ISP will deploy Carrier Grade NAT (means assigning private
IP address to user) and thus accidentally circumvent the speed limiter.
https://www.a10networks.com/blog/carrier-grade-nat/
2019-12-11 21:44:45 +08:00
sledgehammer999
8200ef6bd5
Rework the listening IP/interface selection code
...
Closes #11561
2019-12-11 09:56:45 +02:00
Chocobo1
c896982efb
Fix incorrect translation displayed after language change
...
It is expected in WebUI that the language change applies immediately
(without a program restart) and this static caching prevents that.
2019-12-04 18:25:14 +08:00
Mike Tzou
2e8b17e498
Merge pull request #11521 from Chocobo1/errorStatus
...
Fix stuck in wrong torrent state
2019-12-03 19:22:39 +08:00
Vladimir Golovnev (Glassez)
9342fb15b3
Log "RSS Feed successfully downloaded" event
2019-12-01 20:19:43 +03:00
Chocobo1
bf58555a7a
Migrate away from deprecated API
2019-11-29 02:57:31 +08:00
sledgehammer999
56c0f39593
Merge pull request #11520 from sledgehammer999/revert_fastresume_functionality
...
Revert fastresume functionality
2019-11-27 22:38:21 +02:00
Chocobo1
2ca70cf6cc
Fix stuck in wrong torrent state
...
Before this patch, adding the torrent in
https://github.com/qbittorrent/qBittorrent/issues/11511 and the torrrent
state will stay in torrent_status::checking_resume_data forever.
This is not the correct state since the `torrent_status.errc` field is
non-zero and this commit fixes it.
2019-11-26 03:15:48 +08:00
sledgehammer999
7aa01a1b51
Revert "Always save info dict when saving fastresume"
...
This reverts commit 4aab44e779
.
2019-11-25 15:35:06 +02:00
sledgehammer999
005f0010ec
Revert "Fix unable to remove web seeds"
...
This reverts commit d657c87243
.
2019-11-25 15:34:37 +02:00
Vladimir Golovnev (Glassez)
a4b9a4d9da
Fix compilation for Windows 7 with MinGW
2019-11-22 13:03:52 +03:00
Chocobo1
af52a18f82
Avoid session reconfiguration when limit has not changed
...
Fix up 5d46c9b2d6
.
2019-11-20 12:22:18 +08:00
Mike Tzou
1bd739dd4a
Merge pull request #11493 from Chocobo1/speed
...
Revise "speed limits" related code
2019-11-18 18:40:31 +08:00
thalieht
4ffc0cff12
Reallow to force recheck torrents that aren't fully started
2019-11-16 22:13:35 +02:00
Chocobo1
5d46c9b2d6
Revise "speed limits" related code
...
The old code has a wrong comparison which compares speed limits
in different magnitude: bytes vs KiB. The comparison is removed.
Also the old code treats values that are smaller than 1024 as unlimited
speed which is clearly wrong.
2019-11-17 02:27:59 +08:00
Chocobo1
b55403ce66
Pass TriStateBool by value
2019-11-14 12:14:30 +08:00
Chocobo1
640f52c05f
Let eta function return signed integer
...
We already use signed integer internally so it make sense to return it
as-is.
2019-11-14 12:14:29 +08:00
Mike Tzou
cdb1874263
Merge pull request #11466 from Xegor/master
...
Add "create subfolder" option to RSS auto-download rules
2019-11-14 12:02:06 +08:00
Xegor
325f36fa4f
Add create subfolder option to RSS auto-download rules
2019-11-11 12:46:51 +01:00
Chocobo1
d936bca268
Move DownloadHandlerImpl class to its own file
...
This also resolves lupdate warning.
2019-11-11 19:41:10 +08:00
Chocobo1
9ef2cd48e0
Fix translation not applied
2019-11-11 16:39:55 +08:00
Mike Tzou
d12468ffb5
Merge pull request #11354 from thalieht/pausechecking
...
Reallow to pause checking torrents
2019-11-09 09:28:18 +08:00
thalieht
f150b3077d
Reallow to pause checking torrents
2019-11-08 19:14:50 +02:00
Chocobo1
b408a09755
Remove unused type alias
2019-11-04 13:47:30 +08:00
Chocobo1
1b47350952
Remove anonymous function forward declarations
...
Also reorder the functions slightly to make it compile.
2019-11-04 12:21:16 +08:00
Mike Tzou
2fb1182700
Merge pull request #11317 from Chocobo1/preview
...
Fix "preview file" action not working
2019-11-04 11:32:14 +08:00
Mike Tzou
a7f38eaa82
Merge pull request #11374 from horgan/patch-1
...
Fix country name misspelling
2019-11-03 00:43:48 +08:00
horgan
89d214bb8f
Fix country name misspelling
2019-11-03 00:17:04 +08:00
Mike Tzou
6da39d9279
Merge pull request #11422 from Chocobo1/buffer
...
Reserve memory for file data buffers
2019-11-02 13:16:21 +08:00
Mike Tzou
565eb4cdc8
Merge pull request #11430 from Chocobo1/qt
...
Fix integer narrowing on x86
2019-11-01 10:34:56 +08:00
Chocobo1
e262b86c44
Reserve memory for file data buffers
2019-10-31 23:09:28 +08:00
Chocobo1
f31ee6a225
Fix integer narrowing on x86
...
The f_type is an alias to `int` on 32-bit system and the switch cases
uses `unsigned int`.
Closes #11427 .
2019-10-31 13:04:02 +08:00
Chocobo1
6fd678195c
Replace deprecated Qt functions
...
QSet::toList() is replaced by QSet::values()
2019-10-31 12:40:24 +08:00
Chocobo1
0f60121b94
Add option to control qBittorrent process memory priority
...
This is to avoid Windows swapping out other application data from
OS cache and put in torrent data which hinders other program
responsiveness.
The default value "Below normal" is choosen because casual users have
other higher priority apps (such as browser) running and they don't
expect OS to swap out its data. Dedicated seeders most probably will not
have other app running on their system and would expect qbt has
priority over other background services.
The option only has effect on Windows >= 8.
2019-10-31 03:18:43 +08:00
Chocobo1
29fe0029f0
Rename variables in Session class
2019-10-30 11:56:16 +08:00
Chocobo1
89c58921de
Log error properly
2019-10-30 01:46:57 +08:00
Chocobo1
a3fd340187
Revise Session::getPendingAlerts function signature
2019-10-30 01:46:57 +08:00
Chocobo1
e32ef7f5c5
Use implicit sharing when getting categories from Session class
2019-10-30 01:46:57 +08:00
Chocobo1
865394a59c
Clean up Session class variable initialization
2019-10-30 01:46:56 +08:00
Chocobo1
abb3e7ace0
Move libtorrent session initialization to its own function
...
`m_IPFilteringChanged` default value has changed due to code unification.
2019-10-30 01:46:52 +08:00
Chocobo1
49266cb9e4
Replace boost::int64_t by std::int64_t
2019-10-23 13:43:49 +08:00
Chocobo1
cbe78baff1
Migrate to lt::error_code
2019-10-23 13:43:46 +08:00
Chocobo1
0d3152e4b0
Clean up "network interfaces configuration" code
2019-10-23 13:43:16 +08:00
Chocobo1
0607050ecc
Clean up PreviewSelectDialog class
2019-10-02 21:12:35 +08:00
Chocobo1
021908320e
Preserve relative order when moving to top/bottom in queue
...
Closes #11312 .
2019-10-02 16:03:06 +08:00
Chocobo1
e0a23ba93d
Use InfoHash type in queueing operations
...
This avoids redundant type conversions.
2019-10-02 15:21:16 +08:00
Chocobo1
36056ad5af
Avoid redundant lookups
2019-09-29 15:13:25 +08:00
Chocobo1
d76adff81d
Change Session::deleteTorrent() first parameter to take InfoHash type
2019-09-29 09:52:51 +08:00
Chocobo1
7f453a80d3
Revise SessionSettingsEnums wrapper
...
This simplify the wrapper to become a namespace.
2019-09-29 09:52:13 +08:00
Chocobo1
7276a79cef
Call Windows API directly
...
We already bumped the OS requirement to Windows 7 and those functions
can be called directly without the need to load them first.
2019-09-29 09:52:13 +08:00
Mike Tzou
975b44d05f
Merge pull request #11241 from thalieht/delfolder
...
Add "Remove torrent and its files" option to share ratio limiting
2019-09-29 09:51:41 +08:00
thalieht
07eb261991
Add "Remove torrent and its files" option to share ratio limiting
2019-09-26 13:34:03 +03:00
Chocobo1
de7d62c128
Clean up code
2019-09-25 15:54:47 +08:00
Chocobo1
103e2b9398
Use non-recursive mutex
...
The related classes doesn't really need recursive mutex so drop it. And
if it is really required it usually indicates bad design and we should
avoid it anyway.
2019-09-25 15:50:21 +08:00
Mike Tzou
7a3607c729
Merge pull request #11269 from Chocobo1/signals
...
Improve "stats updated" signal handling in MainWindow class
2019-09-25 09:53:39 +08:00
Mike Tzou
7c7963f93f
Merge pull request #11259 from Chocobo1/tristate
...
Revise TriStateBool class
2019-09-25 09:52:41 +08:00
Chocobo1
58fa5e004f
Improve "stats updated" signal handling in MainWindow class
2019-09-24 11:51:29 +08:00
Chocobo1
72faf89e26
Use the same internal data type for conversion function
2019-09-24 10:49:39 +08:00
Chocobo1
418164bee4
Move "torrent status report" functionality out of Session class
2019-09-23 21:08:59 +08:00
Chocobo1
9968eb53b2
Remove unused signal
2019-09-23 21:08:59 +08:00
Chocobo1
8bbed461a6
Sort signal declarations in Session class
2019-09-23 21:08:59 +08:00
Chocobo1
ed62854af7
Add TriStateBool constructor taking a boolean
...
And move the constructor taking an int to private.
2019-09-23 13:05:32 +08:00
Mike Tzou
3971bf2d58
Merge pull request #11250 from Chocobo1/warning
...
Improve error messages for url_seed_alert
2019-09-19 11:11:30 +08:00
Chocobo1
4d00435209
Improve error messages for url_seed_alert
...
Closes #10119 .
2019-09-18 15:02:59 +08:00
Vladimir Golovnev
19c70fd659
Merge pull request #11235 from glassez/retry-fetch-rss
...
Allow to retry fetching RSS feeds. Closes #11168
2019-09-16 09:58:44 +03:00
Chocobo1
fccbc5318a
Drop logging level to warning for web seed errors
2019-09-15 14:55:16 +08:00
Mike Tzou
12c127b482
Merge pull request #11227 from Chocobo1/alert
...
Handle "alerts dropped" alert from libtorrent
2019-09-15 13:02:34 +08:00
Vladimir Golovnev (Glassez)
cf6e721b00
Allow to retry fetching RSS feeds
2019-09-14 11:33:03 +03:00
Vladimir Golovnev (Glassez)
73ef69526d
Allow to cancel download request
2019-09-14 11:31:07 +03:00
Chocobo1
edcc74c1ae
Add option to align file to piece boundary when creating new torrent
...
Alignment is achieved by adding dummy pad files between files which is
handled by libtorrent.
Closes #10460 .
2019-09-14 12:16:50 +08:00
Chocobo1
5e1e983928
Handle "alerts dropped" alert from libtorrent
2019-09-14 12:09:13 +08:00
Chocobo1
0a959bcbe7
Clean up SettingsStorage::save()
...
Also it should return `true` when `m_dirty` is `false`.
2019-09-08 15:03:25 +08:00
Chocobo1
e7e5ee1ea2
Add const to TransactionalSettings class functions
2019-09-08 14:38:14 +08:00
Chocobo1
daf52a2610
Avoid double lookups
2019-09-08 14:28:38 +08:00
Mike Tzou
d2c21ce507
Merge pull request #11195 from Chocobo1/mac
...
Replace deprecated macro
2019-09-07 11:58:23 +08:00
Chocobo1
7113174593
Treat .magnet file extension as case insensitive
...
Closes #11200 .
2019-09-06 12:30:50 +08:00
Chocobo1
0d5b0b9542
Replace deprecated macro
...
Q_OS_MAC is deprecated and the replacement is Q_OS_MACOS.
2019-09-05 20:16:18 +08:00
Chocobo1
9dc3b18178
Fix filename validation on non-Windows OS
...
Closes #11191 .
2019-09-05 20:05:21 +08:00
Chocobo1
2396ef5bd6
Move error logging of adding peers to the proper place
2019-09-04 16:09:24 +08:00
Chocobo1
3104291734
Add check for null pointer
...
Fix up d657c87243
.
2019-09-03 22:26:41 +08:00
Mike Tzou
4363082173
Merge pull request #11104 from Chocobo1/resume
...
Fix unable to remove web seeds
2019-09-03 12:12:56 +08:00
Chocobo1
2a66bb3127
Construct QHostAddress more efficiently
2019-09-01 22:33:01 +08:00
Chocobo1
4aab44e779
Always save info dict when saving fastresume
...
Otherwise torrents loaded from fastresume won't have it and needs
to redownload it from elsewhere and slowing down the startup process.
This is also required for the future where we will drop loading the
`info` dict from .torrent files.
2019-08-31 22:59:33 +08:00
Chocobo1
d657c87243
Fix unable to remove web seeds
...
As suggested in post [1] we don't need to assign the `ti` field anymore when fastresme
already contains the `info` dict.
[1]: https://github.com/arvidn/libtorrent/issues/3946#issuecomment-523300003
2019-08-31 22:52:22 +08:00
Mike Tzou
62a3938480
Merge pull request #11085 from Chocobo1/model
...
Better on-demand reloading of torrent data
2019-08-30 12:45:57 +08:00
Mike Tzou
7ce26435bd
Merge pull request #11126 from Chocobo1/addedTime
...
Fix wrong "added on" date
2019-08-28 12:04:23 +08:00
Chocobo1
09503b58fa
Clean up loadTorrentResumeData()
2019-08-27 15:01:50 +08:00
Chocobo1
f3ce76110b
Simplify code
...
Instead of using dict_find_list() now we use the simpler dict_find()
since we are going to check its validness anyway.
2019-08-27 15:01:50 +08:00
Chocobo1
3a11c23efd
Fix wrong "added on" date
...
This only happens for magnet links when its metadata has yet to be retrieved.
Closes #11124 .
2019-08-27 15:01:50 +08:00
Chocobo1
0891cd4878
Avoid unecessary copying the parameter
...
Using forwarding reference here so that we won't get unnecessary copies
of the parameter passed to `slot`, for example a lambda function.
2019-08-27 14:30:03 +08:00
Mike Tzou
5c7f9530ee
Merge pull request #11060 from Chocobo1/tracker
...
Improve embedded tracker
2019-08-22 12:18:56 +08:00
Chocobo1
8d0d8e4dcb
Improve embedded tracker
...
Now it conforms to BEPs more closely.
2019-08-21 18:05:50 +08:00
Chocobo1
bbecf87292
Handle invalid time activity properly
...
When there is no activity before m_nativeStatus.last_upload will be 0
and this commit will map it to -1 which retain the expected behavior as
before (libtorrent < 1.2 era).
2019-08-21 17:45:04 +08:00
Chocobo1
1f3bf75fff
Better on-demand reloading of torrent data
2019-08-17 15:44:16 +08:00
Chocobo1
94f7a095bb
Implement proper equal operators
2019-08-16 01:35:41 +08:00
Mike Tzou
767f024585
Merge pull request #7475 from thalieht/ratiosuperseed
...
Add option to enable Super Seeding mode once ratio/time limit is reached. Closes #7160 .
2019-08-10 11:33:09 +08:00
thalieht
1f6f1716ad
Enable Super Seeding mode once ratio/time limit is reached
2019-08-09 13:06:34 +03:00
Chocobo1
6ac36368cd
Update user agent string
2019-08-09 13:12:11 +08:00
Mike Tzou
2427f5d324
Merge pull request #11041 from Chocobo1/splitRef
...
Revise operations in TorrentHandle class
2019-08-09 12:27:44 +08:00
Chocobo1
c420ff29af
Revise operations in TorrentHandle class
2019-08-08 18:57:54 +08:00
Chocobo1
b5b678c58f
Replace QString::split() by faster alternatives
2019-08-08 18:57:54 +08:00
Chocobo1
672b44acba
Let OS assign listening port
...
This applies when "Use different port on startup" option is selected.
2019-08-08 13:14:25 +08:00
Chocobo1
c19f8f6b5e
Use a randomized port number for the first run
2019-08-08 13:14:23 +08:00
Mike Tzou
7f1bff4eb4
Merge pull request #11017 from Chocobo1/apictrl
...
Improvements to APIController class
2019-08-06 10:17:27 +08:00
Chocobo1
d92bf13706
Use a QString directly instead of QStringList
2019-08-05 20:56:16 +08:00
Chocobo1
e90a2c00a5
Replace QList by QVector
2019-08-05 20:56:15 +08:00
Chocobo1
f4e7b8c6bf
Replace QMap with QHash
2019-08-05 09:51:39 +08:00
Mike Tzou
3811612f80
Merge pull request #10982 from Chocobo1/cleanup
...
Code base cleanup
2019-07-31 14:24:42 +08:00
Chocobo1
c1659a189b
Fix messed up symbols in log
2019-07-31 02:10:22 +08:00
Chocobo1
3ab2fe907f
Remove Windows XP remnants
2019-07-31 02:10:22 +08:00
Chocobo1
38fa6d2aee
Fix incomplete file extension not applied for new torrents
2019-07-28 13:05:46 +08:00
Chocobo1
7ab3479a34
Replace static_cast by qOverload
2019-07-26 22:32:18 +08:00
Chocobo1
ca44b40222
Move variables to the proper scope
2019-07-26 22:32:18 +08:00
Chocobo1
ccec50e18e
Improve parsing in BitTorrent::PeerAddress::parse
2019-07-24 22:22:02 +08:00
Vladimir Golovnev
02ab77053e
Merge pull request #10961 from glassez/fastresume
...
Save updated resume data for completed torrents
2019-07-23 18:47:30 +03:00
Vladimir Golovnev
cf2e7d77d6
Merge pull request #10950 from glassez/drop-deprecated
...
Don't use deprecated libtorrent features
2019-07-23 09:19:15 +03:00
Vladimir Golovnev (Glassez)
4021a0c7ce
Store libtorrent native file index in QHash
2019-07-23 06:43:39 +03:00
Vladimir Golovnev (Glassez)
3d70ebfc46
Save updated resume data for completed torrents
...
If fastresume data was rejected we need to save updated
resume data after torrent finishes rechecking.
2019-07-23 06:32:13 +03:00
Vladimir Golovnev (Glassez)
ad6a40d5f4
Extract PeerAddress class into separate file
2019-07-23 06:27:35 +03:00
Vladimir Golovnev (Glassez)
b822d2c380
Fix requested torrent resume data handling
...
Session should increase an appropriate counter each time
the torrent resume data is requested to save.
2019-07-22 14:22:26 +03:00
Vladimir Golovnev (Glassez)
60ffa3030e
Don't use deprecated libtorrent features
2019-07-21 19:28:28 +03:00
Chocobo1
4a90716843
Add override keyword to functions
2019-07-19 11:58:56 +08:00
Chocobo1
7a5e883cd2
Revise inline keyword usage
...
And let compiler decide whether to inline functions.
2019-07-16 18:42:55 +08:00
Chocobo1
f6f8aaf3db
Put internal function into anonymous namespace
2019-07-16 18:42:26 +08:00
Chocobo1
f993230582
Use uniform initialization
2019-07-16 18:42:26 +08:00
Vladimir Golovnev
17541b0d34
Merge pull request #10921 from glassez/ignore-actions
...
Ignore some actions on uninitialized torrents
2019-07-15 08:44:42 +03:00
Vladimir Golovnev (Glassez)
87d98403f4
Don't break torrent checking
2019-07-14 12:34:50 +03:00
Vladimir Golovnev (Glassez)
9462685c78
Ignore some actions on uninitialized torrents
...
Some actions can lead to an inconsistent state if applied
to an uninitialized torrent, so we just ignore them.
2019-07-14 12:34:28 +03:00
Vladimir Golovnev
b9da9ebfdf
Merge pull request #10910 from glassez/fix-add-torrent
...
Avoid race conditions when adding torrent
2019-07-14 10:45:05 +03:00
thalieht
7b31868e3c
Rename priority to queue in the context of torrents
2019-07-13 14:04:16 +03:00
Vladimir Golovnev (Glassez)
644dc9792d
Avoid race conditions when adding torrent
2019-07-13 12:06:07 +03:00
Mike Tzou
24932f6cb6
Merge pull request #10895 from Chocobo1/tracker
...
Add dialog to mass edit torrent's tracker
2019-07-12 10:59:50 +08:00
Chocobo1
9e7f50517e
Add "Tracker entries" dialog
2019-07-11 12:10:19 +08:00
Mike Tzou
51fa98aa0b
Merge pull request #10702 from jagannatharjun/qss-styling
...
Allow Styling through QSS
2019-07-10 19:32:19 +08:00
Prince Gupta
a24925c858
Allow styling with QSS stylesheets
2019-07-09 19:56:55 +05:30
Vladimir Golovnev (Glassez)
9399b876eb
Fix torrent checking issues
...
Start all torrents auto-managed to prevent simultaneous checking
of multiple torrents.
Handle checking state of paused torrent to prevent it from being
resumed when qBittorrent is closed until checking isn't complete.
2019-07-09 08:54:50 +03:00
Chocobo1
b9094ff8a5
Use proper log message when there are no error
2019-07-05 23:46:12 +08:00
Chocobo1
664cfe7d69
Fix torrent properties not saved for paused torrents
2019-07-05 23:46:12 +08:00
Chocobo1
c4dbe84832
Use newer libtorrent API
2019-07-05 23:46:12 +08:00
Chocobo1
ed2199b91c
Add "File pool size" option
2019-07-03 18:06:07 +08:00
Chocobo1
6286bc716c
Add "Socket backlog size" option
...
The default value in libtorrent is 5 which is too small nowadays.
The new default value 30 is chosen to be in line with
QTcpServer::maxPendingConnections().
2019-07-03 17:36:56 +08:00
Chocobo1
73cf3fb68f
Use LogMsg() helper
2019-07-02 22:34:22 +08:00
Chocobo1
e6c448aa4f
Replace obsoleted QProcess::finished(int)
...
It is replaced by QProcess::finished(int, QProcess::ExitStatus).
2019-07-01 19:08:37 +08:00
Chocobo1
2bc91fba3e
Use newer libtorrent API
2019-06-28 20:36:31 +08:00
Chocobo1
0b1b3c1f84
Use numeric_limits instead of constants from C
...
In C++, using numeric_limits is more idiomatic compared to using constants.
2019-06-23 11:16:58 +08:00
Chocobo1
042cd4267f
Remove upper limit of "Disk cache" setting
2019-06-22 17:13:24 +08:00
Mike Tzou
1831f71cc4
Merge pull request #10833 from Chocobo1/invokeMethod
...
Use functor based QMetaObject::invokeMethod
2019-06-22 11:24:47 +08:00
Prince Gupta
ece70daaa5
Fix CMake Windows compilation
2019-06-21 18:05:19 +05:30
Chocobo1
11fdf91196
Suppress compiler warning
...
The debug message is emitting a format mismatch warning.
Fixup 4880dc812c
.
And add curly brackets to if statement.
2019-06-21 00:32:12 +08:00
Chocobo1
e31c1ca780
Use functor based QMetaObject::invokeMethod
2019-06-20 11:36:38 +08:00
Chocobo1
4880dc812c
Use appropriate type
2019-06-19 18:52:24 +08:00
Chocobo1
516c968373
Support year unit in userFriendlyDuration()
2019-06-19 18:52:24 +08:00
Chocobo1
a6c5a90630
Remove redundant variable
2019-06-19 18:52:24 +08:00
Chocobo1
3b015db77d
Add comparison operators for ProxyConfiguration
2019-06-19 18:52:24 +08:00
Chocobo1
623210df58
Improve handleFileErrorAlert error message
2019-06-19 18:52:23 +08:00
Vladimir Golovnev (Glassez)
8e65317d61
Rename "fromNativePath" to "toUniformPath"
...
Unlike "toNativePath" which name clearly reflects the function result
"fromNativePath" has no such clear meaning.
Since this function converts path into uniform format "toUniformPath"
is better name.
2019-06-17 15:55:49 +03:00
Mike Tzou
206bb018dd
Merge pull request #10801 from Chocobo1/timeout
...
Add WebAPI session timeout settings
2019-06-17 00:18:01 +08:00
Mike Tzou
46d445d042
Merge pull request #10792 from Chocobo1/rename2
...
Remove empty leftover folders after rename properly
2019-06-16 12:22:22 +08:00
Chocobo1
a64f3bbc6a
Reorder if conditions slightly
2019-06-15 19:08:24 +08:00
Chocobo1
9893a415c0
Fix updated save path not saved for paused torrents
2019-06-15 19:08:23 +08:00
Chocobo1
7d860b6c24
Log save_resume_data_failed_alert
2019-06-15 19:08:23 +08:00
Chocobo1
4e87aebf55
Don't remove parent directories
...
QDir::rmpath removes *all* parent directories while QDir::rmdir removes
the specified directory.
2019-06-15 19:08:23 +08:00
Chocobo1
440860c4a9
Properly remove empty leftover folders after rename
...
TorrentInfo::origFilePath will return the very original path from
.torrent file, not the most recent file path before the rename operation
and thus the code would not be working as we expected.
2019-06-15 19:08:23 +08:00
Chocobo1
89124bdcc8
Add WebAPI session timeout settings
...
Raise default timeout to 1 hour.
2019-06-15 18:57:19 +08:00
silverqx
4f4f435e76
Add zlib version to GUI & stackdump
2019-06-12 08:02:24 +02:00
Chocobo1
8191f1498a
Log file rename failed errors
2019-06-09 19:07:43 +08:00
Mike Tzou
63b0a5b78c
Merge pull request #10775 from Chocobo1/speed
...
Misc. improvements
2019-06-09 01:57:20 +08:00
Mike Tzou
c95650c4f3
Merge pull request #10752 from thalieht/fw-declare
...
Forward declare and remove some unused #include
2019-06-06 10:18:26 +08:00
Chocobo1
431e7179ac
Remove redundant variable
2019-06-06 00:20:57 +08:00
Chocobo1
fbd5699786
Use switch statement
2019-06-06 00:15:09 +08:00
thalieht
70f8882f87
Group Qt forward declarations separately from the others
2019-06-04 17:48:55 +03:00
thalieht
9995967fbf
Remove some unused #include
2019-06-04 17:48:55 +03:00
thalieht
4370a7eb12
Forward declare in a few places
2019-06-04 17:48:55 +03:00
Vladimir Golovnev
6f6033cf1c
Merge pull request #10754 from glassez/fix-magnet
...
Disable "Upload mode" when start preloaded torrent. Closes #10751
2019-06-04 10:56:11 +03:00
Vladimir Golovnev (Glassez)
b644d6685f
Disable "Upload mode" when start preloaded torrent
2019-06-04 07:14:21 +03:00
Vladimir Golovnev (Glassez)
4ae4ae3cfc
Fix wrong indentation
2019-06-04 06:55:45 +03:00
Vladimir Golovnev (Glassez)
2c145fa57c
Fix incorrectly set torrent startup flag
2019-06-04 06:53:17 +03:00
Mike Tzou
b8e205c048
Merge pull request #10741 from Chocobo1/limit
...
Fix speed limit not applying to IPv6 peers
2019-06-04 11:09:16 +08:00
Vladimir Golovnev
ecb4a76db7
Merge pull request #10742 from glassez/fix-rss
...
Ignore RSS articles with non-unique identifiers
2019-06-03 17:26:57 +03:00
Vladimir Golovnev (Glassez)
68ee071331
Ignore RSS articles with non-unique identifiers
2019-06-02 13:30:00 +03:00
Vladimir Golovnev (Glassez)
d710bbd9ef
Perform more RSS parsing in working thread
2019-06-02 13:29:41 +03:00
Chocobo1
411b956009
Fix speed limit not applying to IPv6 peers
...
`TORRENT_USE_IPV6` is not used by libtorrent 1.2 anymore.
2019-06-02 15:00:27 +08:00
Chocobo1
3f2ce8a2b7
Remove unused stats_alert handler
...
Fixup 0fe9cd05c4
.
2019-06-01 11:43:00 +08:00
Chocobo1
39830986c2
Use alert's timestamp
...
This way has better accuracy than running our own timer.
2019-06-01 11:40:23 +08:00
Chocobo1
0fe9cd05c4
Avoid using deprecated stats_alert
...
From libtorrent doc:
This alert has been superseded by calling post_torrent_updates() regularly on the session object.
2019-05-31 10:58:23 +08:00
Mike Tzou
db88c2d6a5
Merge pull request #10721 from Chocobo1/sort
...
Fix wrong comparison result
2019-05-31 10:50:55 +08:00
Mike Tzou
bb3634c382
Merge pull request #10711 from Chocobo1/alert
...
Log performance alerts from libtorrent
2019-05-31 10:50:03 +08:00
Vladimir Golovnev (Glassez)
05fd0b5859
Fix sequential downloading when redirected
2019-05-29 15:50:02 +03:00
Chocobo1
36cf689432
Fix wrong comparison result
...
The QString::toInt() might overflow when the string is long.
Closes #10706 .
2019-05-29 00:03:04 +08:00
Chocobo1
45bafab4e0
Log performance alerts from libtorrent
2019-05-27 14:46:33 +08:00
Chocobo1
9232dd30dc
Sort function declarations
2019-05-27 09:29:59 +08:00
Chocobo1
1b0ffd7781
Fix wrong logic
...
The error is caused by silly copy-paste error.
Fixup 09ff735007
.
2019-05-25 14:55:27 +08:00
Chocobo1
09ff735007
Use newer libtorrent API
...
This commit covers trackerentry.cpp only.
2019-05-25 11:22:57 +08:00
Chocobo1
ed6bb0efdc
Replace QList by QVector for tracker related operations
2019-05-22 12:57:22 +08:00
Chocobo1
cb4c53c848
Follow the type used in libtorrent
2019-05-19 18:51:09 +08:00
Chocobo1
e92209475e
Use range-based for loops
2019-05-19 18:51:09 +08:00
Chocobo1
10e1c35998
Avoid unnecessary double lookup
2019-05-19 12:06:18 +08:00
Chocobo1
c75500670d
Use forwarding reference when passing function objects
...
So instead of passing every function objects by value (a copy is made), now function objects
will be handled properly by reference (for lvalues) or by value (for rvalues).
2019-05-19 12:06:18 +08:00
Chocobo1
6738cdd715
Constify exception references
2019-05-19 12:06:18 +08:00
Chocobo1
e288de7ec1
Forward declare as much as possible
2019-05-19 12:06:18 +08:00
Chocobo1
401bdbf3d9
Remove unused functions
2019-05-19 12:06:18 +08:00
Chocobo1
ff707ea5af
Change splitToViews() return type to QVector
2019-05-19 12:06:18 +08:00
Mike Tzou
3d6dccc689
Merge pull request #10627 from Chocobo1/alg
...
Improve removeIf() to support other types
2019-05-16 10:45:55 +08:00
Chocobo1
459cdf6071
Fix assertion fail
...
When fileSize == 0, the second index could be smaller than the first index,
thus trigger the assert check in IndexInterval constructor.
Closes #10611 .
2019-05-15 10:22:21 +08:00
Evgeny Lensky
62c72091ce
Change "Add new torrent" dialog to horizontal layout
2019-05-14 11:03:56 +08:00
Chocobo1
c6f3da1097
Improve removeIf() to support set types
...
We can now replace QMutable*Iterator by removeIf() which usage is more consistent with other
algorithm functions.
2019-05-14 01:26:01 +08:00
Chocobo1
5aaf040300
Remove libtorrentfwd.h
2019-05-13 11:20:42 +08:00
Chocobo1
3955eef50d
Change to lt
namespace
...
Quoting from libtorrent doc:
> In the future, libtorrent will be the alias and lt the namespace name.
2019-05-13 11:20:41 +08:00
Chocobo1
4b263f057d
Use newer libtorrent API
...
This commit covers session.cpp only.
2019-05-13 11:20:41 +08:00
Chocobo1
677a419f0b
Use upstream defined namespace
...
`lt` namespace is defined since libtorrent 1.1.6 and our master branch requires >= 1.1.10,
so there is no need to add #if condition for it.
2019-05-13 11:20:41 +08:00
Vladimir Golovnev
af7d8f6a43
Merge pull request #10514 from Mataniko/rss-enclosure-type
...
Download RSS "enclosure" element if no proper MIME type is found
2019-05-11 13:31:46 +03:00
Chocobo1
bd8d70bf60
Refactor HTTP query parsing
2019-05-09 12:41:30 +08:00
Chocobo1
69d29af097
Fix '+' char not decoded to space correctly
...
Closes #10606 .
2019-05-09 11:17:41 +08:00
Matan Bareket
bd2d636bb5
Download RSS enclosure element if no proper MIME type is found
...
In the case where an RSS feed doesn't have the "enclosure" element
with type "application/x-bittorrent", fallback to the last enclosure
element which has no "type" attribute.
2019-05-08 13:46:13 -04:00
Chocobo1
ae793b7395
Use upstream defined namespace alias
2019-05-06 20:26:15 +08:00
Chocobo1
56434fc8b9
Replace obsoleted QDateTime::fromTime_t()
2019-05-06 20:26:15 +08:00
Chocobo1
3f962ba336
Fix displaying invalid creation date
...
The bug is only observed when using libtorrent 1.2.
2019-05-06 20:26:14 +08:00
Chocobo1
3f10ac55a3
Migrate to update-to-date libtorrent functions
2019-05-06 20:26:14 +08:00
Chocobo1
aaed5f7fe0
Remove unused headers
2019-05-01 11:09:25 +08:00
Chocobo1
44e4a5b13a
Avoid performance penalty from type erasure
...
On average the affected code path is 0.1% faster and the result binary
is 10 KB smaller.
2019-05-01 11:09:25 +08:00
Mike Tzou
7db2d1b8cf
Merge pull request #10492 from Chocobo1/server
...
Remove closed connections immediately
2019-04-16 12:25:40 +08:00
Mike Tzou
c7f89f55d0
Merge pull request #10473 from Chocobo1/warning
...
Fix unsafe type narrowing (MSVC C4267 warning)
2019-04-16 12:23:30 +08:00
Chocobo1
a2a669572c
Use QSet for tracking server connections
...
We don't need to maintain order between connections so QSet would be more suitable.
2019-04-15 21:35:35 +08:00
Chocobo1
a35b6cc8dd
Remove closed connections immediately
...
Previously it relied on a timer to drop dead connections but that proved to
be too slow when there is an incoming burst of connections.
Fixes #10487 .
2019-04-15 21:35:10 +08:00
Chocobo1
41773a5465
Fix unsafe type narrowing
...
Appending the warning below:
qBittorrent\src\base/utils/version.h(176): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
qBittorrent\src\base/utils/version.h(185): note: see reference to function template instantiation 'std::array<T,2> Utils::Version<T,2,2>::parseList<StringsList>(const StringsList &)' being compiled
with
[
T=unsigned short,
StringsList=QList<QByteArray>
]
2019-04-15 20:23:26 +08:00
Mike Tzou
19dfec1e0a
Merge pull request #10464 from thalieht/torrent-size-limit
...
Increase the download request size limit from 10 to 100 MiB
2019-04-11 10:14:49 +08:00
thalieht
2f3b7642c2
Show user friendly size in error
2019-04-10 11:39:27 +03:00
thalieht
25102b9c5d
Increase the download size limit to 100 MiB
2019-04-10 11:39:27 +03:00
Chocobo1
d86a984e25
Correctly handle '+' sign in x-www-form-urlencoded data
...
Fixes #10451 .
2019-04-07 13:58:16 +08:00
Vladimir Golovnev (Glassez)
ead078a38e
Add preliminary support of libtorrent v1.2
...
libtorrent v1.2 should be built with deprecated features enabled.
2019-03-18 15:17:03 +03:00
Mike Tzou
d1b0c230ed
Merge pull request #10366 from Chocobo1/logger
...
Avoid performance penalty when logger is full
2019-03-17 15:04:53 +08:00
Chocobo1
04fd6e9d04
Avoid performance penalty when logger is full
2019-03-15 14:29:06 +08:00
thalieht
4c53447d35
Remove the max half-open connections option from GUI
...
Its functionality was deprecated long ago.
2019-03-13 21:08:40 +02:00
Vladimir Golovnev
928ce940c9
Merge pull request #10346 from glassez/download-manager
...
Improve "Download manager"
2019-03-10 09:13:07 +03:00
Vladimir Golovnev (Glassez)
4ee6a0ba29
Use Qt-provided HTTP redirection handling
2019-03-08 13:06:42 +03:00
Vladimir Golovnev (Glassez)
746916a963
Use DownloadHandler behind the scenes
2019-03-08 13:00:37 +03:00
sledgehammer999
c2d1af9853
Merge pull request #10338 from sledgehammer999/raise_qt5_ver
...
Raise minimum Qt version to 5.9.0
2019-03-08 00:42:26 +02:00
Vladimir Golovnev (Glassez)
6cb15706f5
Reduce number of DownloadManager signals
2019-03-05 11:28:29 +03:00
Chocobo1
adbd34c795
Move helper functions to Utils::Gui namespace
2019-03-05 14:55:22 +08:00
sledgehammer999
5c63ad3b95
Raise minimum Qt version to 5.9.0
2019-03-04 16:48:49 +02:00
Mike Tzou
0f1fc7be9d
Merge pull request #10302 from Chocobo1/uptr
...
Replace QScopedPointer with std::unqiue_ptr
2019-03-02 12:26:14 +08:00
Chocobo1
6dab93f7fd
Replace deprecated QDesktopWidget class
2019-02-28 12:02:03 +08:00
Chocobo1
c657134344
Replace deprecated QSslSocket::setDefaultCiphers()
2019-02-28 12:01:36 +08:00
Chocobo1
168d3fbdac
Replace deprecated trUtf8()
2019-02-28 12:01:36 +08:00
thalieht
77aea3c59e
Add const to a few pointer arguments
2019-02-25 17:05:15 +02:00
thalieht
ce437817de
Make various minor changes
2019-02-25 17:05:15 +02:00
thalieht
89dce36e98
Use uniform initialization on some default arguments
2019-02-25 17:05:15 +02:00
thalieht
8a19a0d4a0
Remove const in declarations' arguments that are passed by value
2019-02-25 17:05:15 +02:00
thalieht
70f1537d9f
Add const to almost all remaining vars and arguments that qualify
2019-02-25 17:05:15 +02:00
Mike Tzou
1c14a08390
Merge pull request #10296 from thalieht/clang-tidy
...
Some suggestions from Clang-tidy
2019-02-21 23:17:29 +08:00
Chocobo1
5e3fddf456
Replace QScopedPointer with std::unqiue_ptr
...
These 2 types are very similar and we should prefer the one from C++
standard library, this reduces the number of types in our code base.
Also see:
https://stackoverflow.com/questions/40346393/should-i-use-qscopedpointer-or-stdunique-ptr#comment67966940_40346991
2019-02-18 16:06:40 +08:00
Chocobo1
8fe1ff87f1
Limit DownloadHandler max redirection to 20
...
Closes #10219 .
2019-02-17 22:02:48 +08:00
thalieht
86df25a3e9
Remove some unused stuff
2019-02-16 18:54:18 +02:00
thalieht
8c944bd4e1
Avoid repeating the return type
2019-02-16 18:54:18 +02:00
thalieht
d8cbc9266a
Use 'auto' to avoid duplicating the type name
2019-02-16 18:54:17 +02:00
Chocobo1
409557ef30
Clean up code
2019-02-15 19:47:06 +08:00
thalieht
8a3f942385
Don't use 'else' after return/break
2019-02-13 18:23:25 +02:00
Chocobo1
313a95bdd1
Log DownloadManager SSL errors
2019-02-13 20:09:08 +08:00
Mike Tzou
78ab0e4ba9
Merge pull request #10220 from thalieht/const
...
Add const to many vars and arguments
2019-02-13 12:11:00 +08:00
thalieht
445adb0ab4
Convert pass-by-value arguments to const refs where applicable
2019-02-12 02:45:55 +02:00
thalieht
ca3ce87e06
Add const to many vars and arguments
...
Also remove const in declarations' arguments that are passed by value
2019-02-11 20:19:41 +02:00
Mike Tzou
12aea82031
Merge pull request #10273 from Chocobo1/fix
...
Fix wrong arg placeholder
2019-02-10 13:31:09 +08:00
Chocobo1
79d7ba8205
Fix wrong arg placeholder
2019-02-09 21:26:45 +08:00
Vladimir Golovnev
0413a05246
Merge pull request #10242 from glassez/ordered-recheck
...
Force recheck multiple torrents one by one. Closes #9120
2019-02-08 08:19:30 +03:00
Mike Tzou
efed3fc78c
Merge pull request #10256 from Chocobo1/license
...
Add license header
2019-02-08 12:07:08 +08:00
Mike Tzou
c540e57f55
Merge pull request #10227 from Chocobo1/login
...
Prevent login credential appearing in URL
2019-02-07 13:16:24 +08:00
Chocobo1
364a837dbd
Revise comments about C++14
2019-02-05 13:35:54 +08:00
Chocobo1
6d29a3af60
Make use of std algorithms
2019-02-05 13:35:54 +08:00
Chocobo1
f789df7edf
Add license header
2019-02-04 17:28:55 +08:00
Vladimir Golovnev (Glassez)
61925f74fd
Force recheck multiple torrents one by one
...
Closes #9120 .
2019-02-01 18:15:54 +03:00
Chocobo1
814eef1e56
Fix wrong arg placehoder
2019-02-01 13:38:14 +08:00
Chocobo1
5cdb3b6a2d
Load WebUI certificate & key from file path
...
This allow users to update certificate & key more easily, i.e. without the need to import them
into qbt.
Closes #6675 , #7547 , #8315 , #8564 .
2019-01-28 16:33:48 +08:00
Chocobo1
48d358872f
Cleanup header inclusion
2019-01-28 14:34:13 +08:00
Vladimir Golovnev
5b82b681cb
Merge pull request #10225 from glassez/http-request
...
Separate URL components before percent-decoding. Closes #9116
2019-01-28 08:46:41 +03:00
sledgehammer999
6fdc02f947
Merge pull request #10201 from sledgehammer999/dead_code
...
Remove leftover tracker authentication code
2019-01-27 22:19:21 +02:00
Vladimir Golovnev (Glassez)
b0446380c6
Separate URL components before percent-decoding
...
Allow special characters in query string parameters.
Closes #9116 .
2019-01-27 15:33:19 +03:00
sledgehammer999
4a414d50f1
Remove leftover tracker authentication code
2019-01-23 02:38:46 +02:00
Chocobo1
04227f5a41
Add QBT_APP_64BIT define
...
Now we use QT_POINTER_SIZE to detect CPU bitness, it has the advantage of applicable to all CPU
architectures not limiting to x86 arch.
2019-01-19 10:14:10 +08:00
Vladimir Golovnev (Glassez)
302c99d7d5
Drop support of libtorrent < 1.1.10
2019-01-11 15:13:17 +03:00
Chocobo1
b7627db98c
Remove unused headers
2019-01-06 19:19:57 +08:00
Chocobo1
06e82d10f6
Replace boost::function with std::function
2019-01-06 19:19:57 +08:00
Chocobo1
d013e0922d
Use the proper Qt type
2019-01-06 18:32:01 +08:00
sledgehammer999
6b2a382ab8
Merge pull request #10066 from sledgehammer999/drop_migration_code
...
Drop upgrade code
2019-01-02 21:42:31 +02:00
Chocobo1
2b903fc3d1
Move Utils::Misc::isUrl() function
...
All usage of this function gets to call Net::DownloadManager eventually.
2018-12-31 20:00:15 +08:00
Chocobo1
6759446639
Cleanup code
...
Also remove redundant code, it is already handled correctly in subsequent function calls.
2018-12-31 20:00:15 +08:00
Chocobo1
19d6de795c
Drop support for "BC Link" format
...
The format is marked obsolete on 2009.12.28 and has been replaced by magnet links.
http://wiki.bitcomet.com/inside_bitcomet#bc_link_format_obsoleted_as_of_v117
https://www.bitcomet.com/en/changelog
2018-12-31 20:00:15 +08:00
sledgehammer999
1fff760722
Drop upgrade code
2018-12-31 00:41:17 +02:00
Chocobo1
a5c53ff756
Simplify InfoHash, TrackerEntry class internals
2018-12-26 12:04:41 +08:00
Chocobo1
2a84345835
Mark constructors as explicit
2018-12-26 12:04:40 +08:00
thalieht
d9416299f4
Fix regression on resuming torrents without metadata
2018-12-23 19:23:34 +02:00
sledgehammer999
6f638058d1
Merge pull request #10013 from sledgehammer999/revert_locale
...
Use configured locale only for translating
2018-12-18 16:28:05 +02:00
Stephen Dawkins
70435ab5bf
Keep track of REPACK/PROPER downloads
...
When using the smart episode filter, if the episode contains REPACK and/or
PROPER, these should be stored to prevent it from redownloading a duplicate
episodes.
Closes #9898 .
2018-12-17 09:52:12 +00:00
sledgehammer999
63cf216550
Use configured locale only for translating
...
Don't use other aspects of it eg for date formatting. We should depend
on the system locale for all these. The user probably likes it that way,
otherwise he would have changed it.
2018-12-17 00:13:28 +02:00
Mike Tzou
deed457764
Merge pull request #9993 from Chocobo1/referer
...
Enforce referrer-policy in WebUI
2018-12-14 13:23:04 +08:00
Thomas Piccirello
7f349732ee
Send numeric status without translation
2018-12-11 01:37:33 -05:00
Mike Tzou
cf9d903ba9
Merge pull request #9541 from Piccirello/webui-file-priority
...
Set priority for multiple files in one WebAPI request
2018-12-11 13:32:53 +08:00
Thomas Piccirello
c5b8f62780
Set priority for multiple files in one WebAPI request
...
Closes #6259 .
2018-12-10 23:21:09 -05:00
Thomas Piccirello
f27dc977e9
Replace prio namespace with FilePriority enum class
2018-12-10 23:21:09 -05:00
Chocobo1
7fd30fa90f
Enforce referrer-policy in WebUI
...
This stops leaking private data to other websites via Referrer header.
2018-12-10 22:17:04 +08:00
Mike Tzou
3ff7d16cfc
Merge pull request #9982 from Chocobo1/fixes
...
Fix TravisCI linux builds
2018-12-10 12:33:51 +08:00
Vladimir Golovnev
fc08091765
Merge pull request #9940 from glassez/error-msg
...
Show error message when Session failed to start
2018-12-09 11:16:17 +03:00
Chocobo1
f13bcbd772
Add OpenSSL version to GUI & stackdump
2018-12-08 12:46:50 +08:00
Chocobo1
a137f1493e
Use correct locale to display date
2018-12-08 12:19:56 +08:00
Chocobo1
de437b905b
Fix MSVC C4267 warning
...
The warning was: "warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of
data"
2018-12-08 12:19:56 +08:00
Mike Tzou
6bb4eb825b
Merge pull request #9942 from Chocobo1/pbkdf2
...
Do password hashing properly
2018-12-06 16:22:22 +08:00
Mike Tzou
1eef5b6876
Merge pull request #9373 from FranciscoPombal/checking_mem_usage_adv_settings
...
Add checking_mem_usage option to AdvancedSettings
2018-12-06 16:20:02 +08:00
Mike Tzou
0ab5b8fcba
Merge pull request #9824 from thalieht/style
...
Convert all foreach() to range-based for()
2018-12-06 16:19:17 +08:00
FranciscoPombal
74be5d9030
Add checking_mem_usage option to AdvancedSettings
2018-12-06 03:10:24 +08:00
Vladimir Golovnev (Glassez)
89deccd9b5
Show error message when Session failed to start
2018-12-05 19:57:44 +03:00
Chocobo1
2c8890bd06
Apply PBKDF2 to GUI lock
2018-12-05 13:28:42 +08:00
Chocobo1
05d6a29416
Apply PBKDF2 when storing passwords
2018-12-05 13:28:42 +08:00
Mike Tzou
eb957bb790
Merge pull request #9953 from Chocobo1/announce
...
Use ip parameter from tracker request if provided
2018-12-05 11:13:03 +08:00
Chocobo1
ede9b1a7c4
Fix typo
2018-12-03 12:06:32 +08:00
Chocobo1
b4564f5f4e
Use ip parameter from tracker request if provided
...
Closes #9949 .
2018-12-03 00:14:15 +08:00
Chocobo1
b56937f5fa
Use QHostAddress for storing IP
2018-12-02 14:18:18 +08:00
Chocobo1
36429887dc
Fix wrong locale used in log message
2018-12-01 20:39:20 +08:00
thalieht
1f36b8b89f
Combine qAsConst() with copyAsConst() to asConst()
2018-11-28 23:41:23 +02:00
thalieht
6b1d26d555
Convert all foreach() to range-based for()
2018-11-28 23:40:12 +02:00
thalieht
d668a4fe6d
Fix coding style for various things
2018-11-28 23:37:35 +02:00
Mike Tzou
5efdd211cc
Merge pull request #9892 from Chocobo1/progress
...
Code cleanup
2018-11-29 01:16:07 +08:00
Chocobo1
0339e6ee35
Clean up code
2018-11-27 22:01:27 +08:00
Vladimir Golovnev (Glassez)
68508ba657
Save torrents queue in separate file
2018-11-27 16:55:45 +03:00
Vladimir Golovnev (Glassez)
e146c2f227
Fix signed/unsigned integers comparison warning
2018-11-27 16:55:44 +03:00
Thomas Piccirello
4885fe6b4c
Only instantiate SearchPluginManager as needed
2018-11-21 16:59:38 -05:00
Chocobo1
344e47dcfb
Add option for WebUI Host header validation
...
Closes #9743 .
2018-11-19 11:05:04 +08:00
Vladimir Golovnev (Glassez)
64d7cf4794
Improve RSS Feed updating
...
Don't process "out-of-limit" articles.
Closes #9833 .
2018-11-16 10:30:24 +03:00
Mike Tzou
2ce57b97be
Merge pull request #9799 from Chocobo1/removeCheckbox
...
Remove speed limit checkbox in Options dialog
2018-11-07 13:40:43 +08:00
Vladimir Golovnev
54e4806e3d
Merge pull request #9817 from Piccirello/torrent-dl-success
...
Handle downloading .torrent file as success
2018-11-06 15:39:51 +03:00
Vladimir Golovnev
46ec72f688
Merge pull request #9580 from glassez/start_paused
...
Improve handling of torrent startup/recheck
2018-11-06 15:34:21 +03:00
Chocobo1
3fa5358c3f
Remove speed limit checkbox in Options dialog
...
This unifies speed limit UI elements throughout the program.
2018-11-05 11:07:52 +08:00
Tom Piccirello
1b81356a67
Handle downloading .torrent file as success
...
We don't know whether the download will be successful, so default to success. Closes #9811 .
2018-11-04 14:43:33 -05:00
Chocobo1
c1c28ce195
Improve parser for search engine versions.txt
...
The parse could fail when there is an extra empty line at the end of
file, this patch fixes it.
2018-11-03 01:01:46 +08:00
Chocobo1
ee030cc4eb
Fix wrong type passed to arg()
2018-11-03 00:34:25 +08:00
Vladimir Golovnev (Glassez)
1214cf0fa1
Don't update torrent status unnecessarily
2018-11-02 19:25:39 +03:00
Vladimir Golovnev (Glassez)
9dadb919ef
Improve force recheck of paused torrent
2018-11-02 19:25:38 +03:00
Vladimir Golovnev (Glassez)
a8c00456e4
Restore torrent in two steps
...
Add/restore all torrents in "paused" state and then resume those
that need to be really "resumed" (added/restored in "resumed" state).
Keep torrents with missing files paused.
Force recheck torrent with missing files when it's resumed by the user.
2018-11-02 19:25:26 +03:00
Vladimir Golovnev
dea6b3d7e0
Merge pull request #9562 from dzmat/round_speed_labels
...
Improve scaling of speed graphs
2018-11-01 09:46:26 +03:00
Vladimir Golovnev (Glassez)
5712c05e68
Consider empty locale setting as not set
2018-10-27 20:59:08 +03:00
Mike Tzou
2fd4d50f3a
Merge pull request #9754 from silverqx/previewable-ts-ext
...
Recognize TS files as previewable
2018-10-25 12:56:02 +08:00
silver
0b20750cd5
Recognize *.ts files as previewable
2018-10-24 16:18:35 +02:00
Vladimir Golovnev
7e36cc746f
Merge pull request #8584 from Piccirello/new-search-api-2
...
WebUI search API. Closes #2495
2018-10-24 13:13:16 +03:00
dzmat
fabd7e34f5
Improve scaling of speed graphs
...
Make Y axis scale to fix on predetermined nice looking positions
2018-10-21 16:45:32 +07:00
Mike Tzou
18a64f109d
Merge pull request #9683 from Chocobo1/win_fs
...
Add isNetworkFileSystem() detection on Windows
2018-10-14 01:29:22 +08:00
Vladimir Golovnev
ff72be9c2d
Merge pull request #9481 from mj-p/master
...
Don't recheck just checked torrent. Closes #8743 , #9370
2018-10-13 09:34:27 +03:00
Vladimir Golovnev
72e148e0f1
Merge pull request #9590 from dzmat/disable_graphs_collection
...
Implement option for disabling speed graphs
2018-10-12 08:24:33 +03:00
Chocobo1
acdf5363b2
Simplify #if conditions
2018-10-12 00:04:08 +08:00
Chocobo1
cff5af2e76
Add isNetworkFileSystem() detection on Windows
...
This allows network mounts to be monitored correctly by polling timer.
2018-10-12 00:03:12 +08:00
Mike Tzou
fb8fad3fa1
Merge pull request #9673 from Chocobo1/fs_watch
...
Add SMB2 magic number
2018-10-11 23:11:06 +08:00
Chocobo1
9b552c463f
Add FileSystemWatcher log messages
2018-10-11 11:01:22 +08:00
Chocobo1
25a0147f61
Add SMB2 magic number
...
Closes #9671 .
2018-10-10 10:36:26 +08:00
Stephen Dawkins
d8054f9cb3
Allow to disable downloading REPACK/PROPER matches
2018-10-09 08:14:12 +03:00
dzmat
2d0f0cb372
Allow to disable speed graphs
2018-10-08 23:51:02 +07:00
sledgehammer999
2f1a0ffe5c
Use a more detailed alert mask where possible
...
Closes #9547
2018-10-02 02:42:06 +03:00
Thomas Piccirello
0b6ae68801
Add WebUI search API controller
...
Closes #2495 .
2018-09-30 20:07:27 -04:00
Administrator account
f6ed605414
Don't recheck just checked torrent
...
Closes #8743 .
Closes #9370 .
2018-09-29 17:13:44 +03:00
Chocobo1
b8d87f641f
Avoid variable shadowing
2018-09-26 23:53:17 +08:00
Chocobo1
66ffb01629
Add include guard to headers
2018-09-26 23:49:33 +08:00
Chocobo1
f26a5c3581
Update Python URLs
2018-09-25 11:46:40 +08:00
Chocobo1
7d808cfc99
Fix asking to install Python
...
The dialog asking users to install python is borked since the last refactor, this
commit fixes it.
2018-09-25 11:46:39 +08:00
Chocobo1
60ecc4fe8f
Move python related functions
...
Also the functions are slightly changed to return full path of the found
python executable.
2018-09-25 11:46:39 +08:00
sledgehammer999
6c0af1b078
Merge pull request #9553 from sledgehammer999/misc_fixes
...
Misc fixes
2018-09-22 20:09:54 +03:00
sledgehammer999
06c8142826
Make strings actually translatable
2018-09-22 14:05:41 +03:00
sledgehammer999
e8213b2c6a
Remove unused variable
2018-09-22 14:05:40 +03:00
dzmat
fc93f2eb78
Replace magic number with system define
2018-09-21 22:33:43 +07:00
Vladimir Golovnev
fe9fb03e38
Merge pull request #9482 from proninyaroslav/patch-1
...
Fix typo in variable name
2018-09-13 19:45:14 +03:00
Vladimir Golovnev
28a6ac3197
Merge pull request #9228 from Piccirello/addCategory
...
Add save path and category editing to WebUI
2018-09-13 19:43:28 +03:00
sledgehammer999
c520e657ce
Save state change from queued to paused
2018-09-11 21:00:04 +03:00
Yaroslav Pronin
4e28033c9c
Fix typo in variable name
2018-09-11 17:56:55 +00:00
Vladimir Golovnev
d18de18128
Merge pull request #9461 from thalieht/tracker
...
Show "N/A" if there is no scrape response
2018-09-10 07:14:28 +03:00
thalieht
94613c2fa2
Fix some warnings
2018-09-07 19:40:08 +03:00
sledgehammer999
9ce619eac8
Decrease probability of missing important alerts
...
During startup we can get above 1000 alerts at each pop even with only
30 torrents in the queue. This is because libtorrent will post
piece_finished_alert and file_completed_alert for each torrent. These
alerts push out of the way the ones we care about.
The alert queue will be grown to max only if needed. So we don't use
more memory. It will greatly depend on how many torrents a user has in
their session.
When getting fastresume_rejected_alert we need to act as fast as
possible in pausing it, otherwise there's a chance it will begin
downloading and writing to disk before we pause it.
2018-09-06 02:06:44 +03:00
Thomas Piccirello
63c53766b4
Add save path and editing to WebUI new category dialog
2018-08-31 11:27:05 -04:00
Mike Tzou
846d8993a9
Merge pull request #9410 from Chocobo1/clazy
...
Minor fixes
2018-08-30 12:07:34 +08:00
Elias M. Mariani
33af699191
Support the OpenBSD filesystem
2018-08-28 13:58:09 -03:00
Chocobo1
254782def6
Avoid copy-construct QString in for loop
2018-08-28 14:13:59 +08:00
thalieht
ec9120adf0
Save torrents priorities on torrent finished
...
Save fastresumes for all torrents that shifted in the queue when a torrent finished.
2018-08-25 22:02:14 +03:00
thalieht
95b02bbb2e
Save fastresumes when changing torrent priorities
2018-08-25 22:02:14 +03:00
Vladimir Golovnev (Glassez)
386d0565fe
Always save actual queue position
2018-08-25 22:02:14 +03:00
Vladimir Golovnev
93f9b3de8b
Merge pull request #9314 from thalieht/searchregexfilter
...
Add option to use regexps in the search job's search filter's context menu
2018-08-22 17:15:37 +03:00
Thomas Piccirello
d89ef22d85
Require torrent category creation to be explicit
2018-08-18 22:04:21 -04:00
Chocobo1
262c3a75bd
Fix WebUI unreachable issue
...
QVariant doesn't have constructor for plain char, by default it converts
a plain char into an integer, hence the WebUI issue.
Closes #9333 .
2018-08-19 03:33:08 +08:00
thalieht
400eafce2b
Rename 2 methods to eliminate ambiguity
2018-08-14 13:40:00 +03:00
thalieht
4dcb0b922e
Add regex option in the search filter's context menu
...
In the search job widget.
2018-08-14 13:38:34 +03:00
Chocobo1
71dcc76a64
Replace png icons with svg
2018-08-14 17:03:14 +08:00
Chocobo1
6f2b1823ad
Fix lupdate errors
...
I suspect lupdate isn't smart enough to figure out what tr() is suppose
to do, so just make it a static function in class.
The error was: tr() cannot be called without context
2018-08-13 01:24:34 +08:00
sledgehammer999
366239ca7b
Merge pull request #9244 from Couchy/inhibit_sleep_options
...
Inhibit sleep for running downloads or uploads regardless of network activity
2018-08-12 16:31:01 +03:00