Vladimir Golovnev
4d2943a782
Merge pull request #12033 from glassez/save-torrent
...
Allow to save downloaded metadata as torrent file
2020-02-27 08:49:40 +03:00
FranciscoPombal
966f891d91
Fix response to event=stopped
...
BEP-3 says all tracker responses to valid announce requests should be bencoded dictionaries with at least the "peers" and "interval" keys; the "peers" key can be empty.
Also clarify support for BEP-21.
2020-02-26 20:47:33 +00:00
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
Chocobo1
071ffd13de
Fix wrong field for translation comment
...
The `comment` field is used for disambiguation between identical
strings. Our case here should use the `extracomment` field which
meant as comment for translators.
2020-02-26 13:04:18 +08:00
Chocobo1
f4febb96b4
Remove misleading translation comment
...
Also it was using the wrong field for translation comment.
2020-02-26 12:55:19 +08:00
djt3
e6887fc950
Change placeholder text in torrent list's filter
2020-02-23 14:40:45 +00: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
Chocobo1
ec61ef5145
Fix coding inconsistencies in preferences.html
...
1. Format table tags properly
2. Add a proper label tag
3. Don't use abbreviation for seconds, we use full name everywhere else
2020-02-14 16:23:03 +08:00
Chocobo1
4f7b799732
Use QDeadlineTimer for tracking WebUI banned duration
...
It simplifies our code and the new timer is monotonic.
2020-02-14 16:22:52 +08:00
Vladimir Golovnev (Glassez)
3762514662
Don't access download handler after it's finished
2020-02-14 08:24:49 +03:00
Chocobo1
45bd79ee74
Close document properly after writing
...
Closing document explicitly is recommended by MDN:
https://developer.mozilla.org/en-US/docs/Web/API/Document/write
2020-02-14 12:47:18 +08:00
Chocobo1
f88d6b2e55
Expose WebUI ban counter to users
2020-02-14 12:31:12 +08:00
Mike Tzou
d5a4ebe7c9
Merge pull request #11998 from Kolcha/filter-list
...
Inherit text color for filter list elements
2020-02-14 11:34:55 +08:00
Mike Tzou
195889a854
Merge pull request #11785 from Tester798/fix-portable-mode
...
Fix portable mode
2020-02-14 11:30:32 +08:00
Mike Tzou
882978c80a
Merge pull request #12000 from an0n666/legacy-default-no-random-port
...
Keep legacy default for random port
2020-02-13 12:24:45 +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
an0n666
41d8585932
Keep legacy default for random port
2020-02-12 12:28:13 +00:00
Nick Korotysh
1e59dcdb6c
Inherit text color for filter list elements
...
Filter list (left side panel) in WebUI is implemented using <a> tags,
CSS defines default style for all <a> elements, and specific style for
filter list elements. Default style for <a> elements sets color, and
this color also used in list. This is looks not so well. So lets just
inherit text color from parent element, and as so as it is not set, so
default text color will be used.
This makes filter list looks like other UI elemets, making all UI more
consistent (like in desktop app).
2020-02-12 10:40:08 +03:00
Vladimir Golovnev
4a2fda7edc
Merge pull request #11995 from glassez/fix-magnet-redirect
...
Handle HTTP redirections manually
2020-02-12 09:25:39 +03:00
Vladimir Golovnev
1e63dcb400
Merge pull request #11847 from glassez/legacy-defaults
...
Keep legacy defaults for existing users
2020-02-11 18:44:03 +03: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)
0c6c65f6f8
Keep legacy defaults for existing users
2020-02-11 09:53:12 +03:00
Vladimir Golovnev (Glassez)
86c95db91d
Perform settings upgrade for existing user only
2020-02-11 09:40:57 +03: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
Nick Korotysh
536580ca6b
Use SVG image for WebUI favicon
...
This will allow browsers to get high quality icon with required
resolution instead of resizing some small raster image.
Browsers can have even more benefit from it. For example, Firefox uses
high resolution icon to display it in "Top Sites" instead of page
preview.
Nothing changes for browsers which doesn't support SVG favicons, older
PNG icon will be used in such case.
2020-02-09 08:52:32 +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
ff31bb86bc
Speed up lookup time
...
By adding another variable we can get O(1) lookup time instead of O(n).
Fix up 5f415c292d
.
2020-01-30 19:23:54 +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
Mike Tzou
4884788c0b
Merge pull request #11933 from Chocobo1/qhash
...
Improve qHash functions
2020-01-29 02:07:27 +08: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 (Glassez)
666e733a4a
Track settings changed event in TransferListModel
2020-01-24 07:42:39 +03:00
Vladimir Golovnev (Glassez)
099943ea3c
Fix hide zero values
2020-01-24 07:41:04 +03:00
Mike Tzou
c3ce1aaa3d
Merge pull request #11903 from Sakib-Abrar/gui-improvement
...
Show "∞" instead of " -1" in Preferences
2020-01-22 11:56:26 +08:00
Vladimir Golovnev
89e72b38ea
Merge pull request #11881 from glassez/extension
...
Simplify torrent startup handling
2020-01-22 06:11:33 +03:00
Sakib-Abrar
1768570bf9
Show "∞" instead of " -1" in Preferences
2020-01-22 00:06:19 +06:00
Vladimir Golovnev (Glassez)
f2285e1b63
Redesign torrent startup handling
2020-01-21 10:14:59 +03:00
Mike Tzou
01ad8a443c
Merge pull request #11892 from NotTsunami/cmake
...
CMake: Further CMake improvements and fixes
2020-01-20 11:59:51 +08:00
Vladimir Golovnev
75ebd54ea3
Merge pull request #11088 from jagannatharjun/organize-style
...
Reorganize UI theme selection
2020-01-20 06:56:54 +03:00
NotTsunami
b21ed0063b
CMake: Fix WebUI checks
...
When the CMake system was last revamped, the configure variable was
changed from WEBUI to DISABLE_WEBUI, but we are still checking
against WEBUI. This behavior was changed in fa770871e9
2020-01-19 15:08:45 -05:00
Prince Gupta
c9e162cf8a
Reorganize UI theme selection
2020-01-18 23:12:33 +05:30
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
e27c9bd020
Merge pull request #11871 from NotTsunami/bitwise
...
WebUI: Use correct operators in logical expressions
2020-01-14 12:54:56 +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
Vladimir Golovnev
990e451765
Merge pull request #11865 from shemanaev/fix/webui-files-rename
...
WebUI: Fix first row renaming in files tab
2020-01-14 07:14:13 +03:00
FranciscoPombal
df2fbb1edc
Bump Web API version
2020-01-13 11:41:59 +00: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
NotTsunami
82047104fc
WebUI: Use correct operators in logical expressions
...
As suggested in https://github.com/qbittorrent/qBittorrent/pull/11825#discussion_r365557626
2020-01-13 01:35:38 -05: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
Denis
a7eb792372
WebUI: Fix first row renaming in files tab
...
Ids started from zero and first row converts to false.
Closes #11826 .
2020-01-12 20:05:38 +03:00
Vladimir Golovnev
101ab3cf6c
Merge pull request #11864 from glassez/fix-sorting
...
Fix Transfer list sorting
2020-01-12 11:05:20 +03:00
Vladimir Golovnev (Glassez)
118debd6bf
Fix Transfer list sorting
2020-01-11 18:19:48 +03:00
Chocobo1
396660b031
Fix missing string
2020-01-11 18:48:49 +08:00
Chocobo1
2e4584578b
Bump python version for new installation
2020-01-11 18:48:01 +08:00
Chocobo1
029795bc19
Bump copyright year
2020-01-11 18:47:33 +08: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
Mike Tzou
e2ac97a9e7
Merge pull request #11838 from Chocobo1/webui
...
Minor WebUI code cleanups
2020-01-08 16:50:31 +08:00
an0n666
3f223c3a45
Expose stop_tracker_timeout in advanced settings
2020-01-08 08:21:55 +00:00
sledgehammer999
45ed31fddc
Merge pull request #11733 from sledgehammer999/tracker_error_count
...
Tracker is errored only if all local endpoints fail
2020-01-08 04:24:08 +02:00
Vladimir Golovnev
dc8f4b776c
Merge pull request #11829 from thalieht/doubleclick
...
Allow double-click in preview dialog
2020-01-06 21:11:59 +03:00
Chocobo1
c556b20018
Remove unused variable
2020-01-07 02:08:08 +08:00
Chocobo1
c34883f9af
Add explicit semicolon
2020-01-07 02:07:55 +08:00
Chocobo1
0577cf588c
Remove duplicate line
2020-01-07 01:59:02 +08:00
sledgehammer999
02a027144b
Tracker is errored only if all local endpoints fail
...
Closes #11691
2020-01-05 17:59:54 +02:00
thalieht
c5177eae9f
Allow double-click in preview dialog
2020-01-05 11:28:04 +02:00
Vladimir Golovnev (Glassez)
f56f817c77
Save resume data after recheck
...
Closes #11774 .
2020-01-01 14:29:58 +03:00
Mike Tzou
e906478a16
Merge pull request #11756 from FranciscoPombal/fix_webui_stats_race
...
WebUI: fix populating statistics window
2019-12-28 10:37:03 +08:00
Vladimir Golovnev
37d7323ac0
Merge pull request #11708 from glassez/transfer-list
...
Improve Transfer list architecture
2019-12-27 16:25:26 +03:00
FranciscoPombal
8be804b6ff
WebUI: fix populating statistics window
...
Closes #11665
2019-12-27 12:10:12 +00:00
Vladimir Golovnev (Glassez)
15f2a3b564
Use QStyledItemDelegate instead of QItemDelegate
2019-12-26 22:10:28 +03:00
Vladimir Golovnev (Glassez)
766cfb67df
Fix transfer list architecture
...
Model returns string for DisplayRole.
Text alignment is set by Model (using TextAlignmentRole).
Delegate performs custom painting only where necessary
(i.e. for Progress bar).
2019-12-26 22:09:56 +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
f5f3dc2ba1
Remove unused variable
2019-12-25 19:23:37 +08:00
Chocobo1
2422d81de1
Migrate away from deprecated API in Qt 5.14
2019-12-25 19:23:37 +08:00
Mike Tzou
e62b550bfe
Merge pull request #11635 from FranciscoPombal/prevent_excessive_sync
...
WebUI: Prevent excessive requests to /api/v2/sync/maindata
2019-12-25 13:15:13 +08:00