This PR adds the ability to direct modify a tracker's tier from the WebUI. This process is notably different than the GUI, which provides arrows for increasing/decreasing a tracker's tier.
Closes#12233.
PR #22963.
Implemented: Tracker endpoints in the list, missing "Tracker Error" and "Unreachable" status, "Next Announce" and "Min Announce" column and double click to edit tracker url.
PR #23045.
This PR uses the new APIs from #21015 to provide a WebUI Add Torrent experience more closely matching the GUI's.
New functionality:
- View torrent size, date, infohash, files, etc.
- Reprioritize and ignore files before adding
- Specify tags when adding torrent
- Specify save path for incomplete torrent
Closes#20557, closes#10997, closes#12499, closes#14201, closes#15071, closes#15718, closes#16207.
PR #21645.
The methods for checking if qBittorrent is set as the standard application for opening torrent files and magnet links and setting qBittorrent as the standard application for those is using deprecated methods now. For example `LSCopyDefaultHandlerForURLScheme` and `kUTTagClassFilenameExtension`.
The new methods have been moved to `macutilities.mm` because in `os.cpp` cocoa couldn't be imported.
PR #23059.
Currently the hardened runtime is enabled for code signing in the github workflow for macOS. However in this thread https://github.com/qbittorrent/qBittorrent/discussions/23041#discussioncomment-13969415 a user had a problem to open the nightly builds from github. Relevant part of the error:
```
Reason: tried: '/private/var/folders/y0/jmsflc717tn_tj2x9d1g3d9w0000gn/T/AppTranslocation/8B53E367-2E0C-42C1-A4D5-6787109EE46E/d/qbittorrent.app/Contents/Frameworks/QtWidgets.framework/Versions/A/QtWidgets' (code signature in '/private/var/folders/y0/jmsflc717tn_tj2x9d1g3d9w0000gn/T/AppTranslocation/8B53E367-2E0C-42C1-A4D5-6787109EE46E/d/qbittorrent.app/Contents/Frameworks/QtWidgets.framework/Versions/A/QtWidgets' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/private/var/folders/y0/jmsflc717tn_tj2x9d1g3d9w0000gn/T/AppTranslocation/8B53E367-2E0C-42C1-A4D5-6787109EE46E/d/qbittorrent.app/Contents/Frameworks/QtWidgets.framework/Versions/
(terminated at launch; ignore backtrace)
```
Further investigation showed that when disabling the hardened runtime this won't occur any more. I haven't noticed this before because the error wouldn't occur when SIP (system integrity protection) is disabled and I have it disabled now.
PR #23058.
Currently `NSUserNotifications API` is used on MacOS to display notifications. However this is marked as deprecated and should be replaced with `UserNotifications.frameworks API`. With the new API it is required to ask for permission before notifications can be send. The program will ask for permission to send notifications on the start.
Related: #15630.
PR #23019.
The following message appears when using the outdated value:
>[@stylistic/eslint-plugin]: You are using deprecated value(boolean) for "allowTemplateLiterals"
>in "quotes", please use "always"/"never" instead.
Also prefer using double quotes over backticks for strings.
PR #23038.
Now when user specified 'help' or 'version' flag, the program will process them first and
ignore all other flags (even invalid flags).
This improves program usability since user will be able to consult the help description without
ensuring existing flags are all valid (or removing all flags). And user can refine the flags
after reading the help description.
PR #23037.
Currently `iconForFileType` is used on macOS to display the file icons in the content tab. However this is marked as deprecated and should be replaced with `iconForContentType`.
Related #15630.
PR #22992.
Currently when you delete or move a torrent sometimes an empty folder will stay. This is because hidden files will stay which didn't got deleted.
The reason that it is not working is that QDir::Files is used which doesn't lists hidden files. Adding QDir::Hidden will make the code work as expected. At least on Windows and macOS QDir::Files doesn't lists hidden files. I can't test on linux.
PR #22983.
When a category's download path option is set to "Default", its `downloadPath` is serialized into JSON as `undefined`. This results in the `downloadPath` field being omitted from `torrents/categories` and `torrents/maindata` payloads (as is expected with an `undefined` value).
The use of `undefined` here causes an issue in the WebUI. Specifically, when the category previously contained a value for this field (i.e. download path option set to either "Yes" or "No"), the `processMap` logic in `SyncController` does not detect the removal this field. This results in the category's new `downloadPath` not being properly sent to the client. By switching from `undefined` to `null`, we ensure that the `downloadPath` value is always included in the category's payload. This allows `processMap` to properly detect whenever the value changes.
This change is backwards compatible with existing categories.json files. Older qBittorrent versions should also be able to parse new categories.json files containing `null`.
More context: https://github.com/qbittorrent/qBittorrent/pull/22938/commits/cd3fbfbf9b63a42f1d4d9d48d0c2d20a5c1a4b28#r2173148696
PR #22958.
This change makes the WebUI easier to use on small screens (e.g. mobile). In cases where the window's default size is larger than the user's screen, the window will be resized appropriate (see example below). Every window has been tested for compatibility. The only windows that don't support this are the multi file rename window and the RSS Downloader window.
Closes#19813.
PR #22919.
This change better handles resizing of elements on the search page to ensure no controls are hidden at typical mobile screen sizes.
Improvements seen below:
- "Search" button is now accessible
- Content no longer overflows w/ "Search plugins..." button pushed offscreen
- Tabs overflow horizontally and are scrollable, rather than pushing down the search results table
PR #22916.
The toolbar should be hidden when not on the "Transfers" tab. The hiding of this toolbar can result in resizing the panels, especially on mobile, so we should recompute panel heights.
PR #22915.
Previously, the tabs would overflow to the next line, often being hidden by other content. For example, the "Content" tab is now accessible on mobile.
PR #22914.
`m_torrentMetadataCache` previously used a torrent's InfoHash as its key. However, InfoHashes for hybrid torrents cannot be serialized and deserialized via their TorrentID (e.g. `InfoHash(TorrentID(infoHash.toTorrentID().toString())) != infoHash`). This is due to hybrid InfoHashes containing both a v1 and v2 hash, while the serialized TorrentID only contains a single truncated v2 hash. Thus we cannot expect an InfoHash serialized by its TorrentID to be able to construct an equivalent InfoHash. By switching to the TorrentID, we always have a single ID to use.
Follow up #21015.
PR #22926.
This brings a fallback version check to the update mechanism,
which should be as stable as it can be.
It will allow migrating to another primary mechanism without
having to have updated the older primary mechanism too.
Hacked qbt instances may contain malicious script placed in Run External Program and the script
will attempt to hide itself by adding a lot whitespaces at the start of the command string.
Users may mistake the field of being empty but is actually not.
So trim the leading whitespaces to easily expose the malicious script.
Note that GUI already trim the fields and only WebAPI doesn't trim them. This patch will unify
the behavior.
Related: https://github.com/qbittorrent/docker-qbittorrent-nox/issues/71#issuecomment-2993567440
PR #22939.
* WebUI: use defer when loading scripts
So that the HTML layout can be rendered earlier.
* WebUI: move scripts into <head> section
For consistency reasons.
This change drastically improves the performance of changing a table's sorted column. This performance is achieved through improved data structures, namely removing operations that repeatedly spliced an array. We also no longer iterate over a potentially large array.
On a torrent with ~50,000 files, re-rendering after a sort improves from ~20 seconds to 2 seconds.
PR #22827.
When double clicking on a filter, all other filters will be reset. For example, double clicking on a status filter will reset the categories, tags, and trackers filters to "All". This behavior can be disabled in WebUI options.
Closes#22449.
PR #22818.
This change ensures that the WebUI caches relevant server stats for immediate display once the statistics window is opened. Previously, all stats would remain blank until maindata was fetched. This could take a while if e.g. the user was on the search tab.
Closes#22764.
PR #22817.
The Language option now has its own layout since it is independent to other options (Style and Color scheme).
This avoids text in Language combobox to be left out and replaced by `...` due to Style Hint text being too long.
PR #22823.
## Description
Send file/folder metadata instead of just the name of a filesystem entry.
Currently the endpoint only sends a list of string, containing the path of each entry, without specifying its type (file or folder).
The optional `withMetadata` flag has been added to provide metadata and to prevent breaking changes with older versions.
If `true`, JSON response will be an array of objects instead of an array of strings.
This object contains:
- `name`: the name of the file system entry (without path)
- `type`: Whether the file system entry is a "file" or a "dir"
- `creation_date`: file system entry's creation date
- `last_access_date`: file system entry's last access date
- `last_modification_date`: file system entry's last modification date
If the entry is a file, a `size` field is present with the file size in bytes.
## Objective
Build a server file browser inside WebUIs, feature is currently being developed for VueTorrent.
It will include file metadata, filtering and sorting on the different fields.
PR #22813.
In #22567, I made it so the web UI wouldn't refresh the main data while the page is hidden. This causes the session to time out (after 1 hour by default).
This PR changes that to instead refresh every Preferences/WebUI/SessionTimeout / 2 instead of not at all, which should keep the session alive.
PR #22804.
See #22734, there is a memory leak in the MooTools .destroy(), this replaces all uses of that with the browser native .remove().
This also overrides the MooTools Document.id function, which is used by $(id). The original function always allocates an ID to elements it selects, the override doesn't, and is also a little more efficient.
Closes#22734.
PR #22754.
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
Now it checks for all python installations and related procedures has been revised.
If the python version does not meet the minimum requirement, it will be logged.
PR #22729.
This PR improves the user experience on mobile devices by ensuring the username field in the login form does not automatically capitalize the first letter when the keyboard opens.
Mobile browsers tend to automatically capitalize the first letter of text inputs, which can lead to login failures if the username is case-sensitive. By explicitly disabling autocapitalization, the WebUI ensures a more predictable and user-friendly experience on mobile devices.
Tested on:
iOS (Safari)
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
PR #22725.
Before the release of 5.1.0 I believe these two fields both used monospace fonts and also had an increased font size, maybe 14px (I couldn't find in blame where/how this regressed). Ideally, I'd like to bring this back, as it makes elaborate regexes easier to grok. This PR currently just tells the browser to use its monospace font, but I could also add a similar in-line style for font size. I just don't know if this is the best way to solve this problem; if there's a better place for this sort of styling to happen let me know
PR #22719.
For windows environment the `--help` output will show :
```
set QBT_NO_SPLASH=1
C:\Program Files\qBittorrent\qbittorrent.exe
```
instead of
```
QBT_NO_SPLASH=1 C:\Program Files\qBittorrent\qbittorrent.exe
```
Fixes#22662.
PR #22695.
Memory working set limit is not effective on Linux at all. See [`getrlimit(2)`](https://man7.org/linux/man-pages/man2/getrlimit.2.html) → `RLIMIT_RSS`.
Introduced in #16874, disabled for macOS in #19805. This PR hides the option for Linux too.
Worth to mention that #19805 did not deliver the change for WebUI. So there is also a small fixup, I covered both cases.
Also removed pointless "This option is less effective on Linux" remark.
PR #22680.
Mootools is no longer used to create PiecesBar class (+ I cleaned it up a bit and turned into custom element but everything should work as before).
PR #22670.
Making General-tab text `unselectable` is not an improvement.
It begs to add a new `Copy -> Save path` feature, because using `Set location` to copy save path (*which requires a request*) is not faster than simply copying it from the `General` tab by double-left clicking and pressing `CTRL+C`.
I don't see a reason why its necessary to software-restrict people from copying details from the `General`-tab - there are several reasons why you would - incl. the above mentioned usecase for quickly copying save-path, but other than that its counterproductive to limit people from copying the details displayed.
PR #22663.
Convenience feature in the "Rename Files" menu in the WebUI.
If you click one file's checkbox, and then click another with Shift held, all the checkboxes between those two will be selected/unselected based on the state of the first checkbox.
It's based on what the Windows file explorer does when holding Ctrl and Shift
Closes#22455.
PR #22610.
Makes asynchronous logic to look more straightforward.
Allows caller to choose blocking or non-blocking way of obtaining asynchronous results via the same interface.
PR #22598.
Deferring the opening of the preview slightly gives the preview select
dialog time to close and for focus to shift back to the main window.
PR #22608.
Closes#22607.
---------
Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
Currently, there is unnecessary CPU/network usage by the web UI when it's running in the background, this PR prevents it from refreshing in the background.
Closes#22565.
PR #22567.
Adding virtual list support to dynamic tables to improve performance on large lists, I observed a 100x performance improvement on rendering on a torrent table with 5000 torrents.
This optimization is disabled by default and can be enabled in options.
PR #22502.
Add clamping for seeding and inactive seeding time limit on setting from dialog and loading from config.
Closes#21953.
PR #22558.
Signed-off-by: Kostiantyn <kos.chernenok@gmail.com>
Swap "Add torrent file" with "Add torrent link" button to be consistent with order in File menu.
Closes#22420.
PR #22557.
Signed-off-by: Kostiantyn <kos.chernenok@gmail.com>
Previously it require each plugin to import helpers.py to setup SOCKS proxy.
Now it is enforced by default for all plugins.
Also added a function for plugins to ignore/restore the socket to
default state.
PR #22554.
Pass 'Perform hostname lookup via proxy' setting along the way.
Also add underline to variables and functions that are private to the python module.
PR #22510.
Introduced Author, 'Open link' headers.
Note that the Author and 'Open link' are not mandatory fields in RSS/Atom feeds. So these
headers will only be displayed when the feed includes them.
PR #22503.
Fixup for #21145
To reproduce:
1. Select status filter with 0 torrents
2. Enable 'Auto hide zero status filters' and save settings. Hidden filter is still selected:
PR #22487.
Some people are still unhappy with "standalone window mode" of "Add new torrent dialog" so just provide them with an option to use old "modal dialog mode" in all the current qBittorrent branches.
PR #22492 (based on original PR #19874).
The affected options are not really incompatible with SOCKS4 but it is due to Qt missing
implementation. Therefore 'unavailable' is more suitable.
PR #22483.
Now the behavior is more intuitive for a few options when the client send in partial settings.
This change is backward compatible.
For example, now it is possible to have only one of `max_ratio_enabled` or `max_ratio` instead
of requiring both.
PR #22460.
1. Utilize string matcher
2. Remove split behavior parameter
Previously `KeepEmptyParts` behavior doesn't match Qt's
implementation and since our codebase doesn't really make use of it,
we can just remove the parameter.
3. Add tests.
PR #22352.
In Trackers table, moving the 'URL' column from its default (2) position caused the 'Tracker editing' dialog to display incorrect data.
Steps to reproduce:
1. Move 'URL' column in Trackers table to any position from default
2. Choose tracker URL and click 'Edit tracker URL'
PR #22338.
We can only edit one URL through the dialog, so there's no point in showing this context option when more than one tracker is selected in trackers table.
PR #22311.
This PR fixes a bug where the sort icon did not update correctly after reordering columns.
Steps to reproduce:
1. Sort a column
2. Move it to a different position
3. The sort icon remains in its original location
PR #22299.
The `round()` returning floating point number is not a good idea. This is due to floating point
representation is imprecise and sometimes it cannot faithfully represent a number, for example
`0.09 + 0.01 !== 0.1 `. Therefore, it should be avoided and/or utilize other function
to achieve the goal.
Also, improve `window.qBittorrent.Misc.toFixedPointString()` and add test cases.
PR #22281.
This PR fixes a memory leak in context menus. Previously, for some reason, each menu retained references to its target elements without utilizing them further. Since the targets property was accessible/reachable from the root (window object), these references persisted even after the elements were removed from the DOM, preventing them from being garbage collected.
It's easily reproducible - just add a decent amount of torrents, switch between categories multiple times, then capture heap/detached elements snapshot in the Memory tab (Chrome dev tools). The number of detached elements will continue to increase after each category switch and they won't be cleaned up.
[More context](https://github.com/qbittorrent/qBittorrent/pull/22220/files#r1941137796)
PR #22234.
The `announce_port` setting permits to overwrite the port passed along to trackers as the `&port=` parameter. If left as the default, the listening port is used. This setting is only meant for very special cases where a seed's listening port differs from the effectively exposed port (e.g., through external NAT-PMP). See https://github.com/arvidn/libtorrent/pull/7771 for an example use-case.
This PR adds the relevant setting alongside the existing `announce_ip` setting.
PR #21692.
From https://stylelint.io/user-guide/configure :
>Stylelint currently supports other configuration locations and formats, but we may remove these
>in the future:
>...
>.stylelintrc.json file
This is another optimization for torrent management on large scale instances with the goal to minimize the amount of required API calls. Ref #22128.
This new function and endpoint torrents/setTags does an upsert to replace the torrent tags and handles the removal and add internally, instead of doing multiple calls to add and remove tags on torrents from the client.
PR #22156.
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
This PR adds an optional parameter includeTrackers to the Torrent info endpoint /torrents/info to include the trackers list of each torrent in the response under the key trackers.
PR #22128.
Current URL seed error message assumes that only possible error is DNS lookup failure, which is not true.
So replace it with a more generic message. Real reason is provided by the 'Error:' part.
PR #22119.
Trackers specified at the URL will be added to newly added public torrents.
This feature is adapted from qBittorrent-Enhanced-Edition to allow for automatically adding trackers retrieved from a URL. @ngosang's trackerlist repo is a good example, however I've opted not to include a default URL.
Partially addresses #14535.
PR #21828.
Changing input type from text to search for all search and filter inputs
to enable user to easily clear input.
This feature is yet to be implemented in Firefox.
See tracking bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1654288
Also fix search icon horizontal positioning and minor input box paddings.
Closes#15481.
PR #22033.
Now all items under `QGridLayout` are required to be sorted. This allow
us to omit tabstop order. The tabstop order will follow the layout order.
The script can be invoked to fix wrong grid items order in .ui files:
```console
python check_grid_items_order.py file.ui
```
Now on Windows, it won't follow/include .lnk files when creating torrents.
Note that libtorrent will throw errors if we force adding .lnk files.
Non-Windows OS will still follow symlinks.
Closes#13286.
PR #21944.
The `Content-type` header isn't required since `URLSearchParams` is present.
The `method` property is preferred to be always specified for clarity.
The `cache: "no-store"` is preferred for most GET requests to avoid caching.
PR #21891.
Previously we would still download the file but it would contain the error response, resulting in an invalid file.
To test: export a .torrent file for a torrent that hasn't yet downloaded metadata
PR #21696.
Signed-off-by: Thomas Piccirello <thomas@piccirello.com>
The speed icons in the status bar look weird. Whenever I look at them, there seems to be something off with them. The circle seems to have been stretched. Also, the gap between the needle and the circle is not big enough to be clearly visible (at least on my display).
PR #21853.
Event delegation is now used to handle basic table events.
2 minor fixes were added to match GUI behavior:
* Clicking on the table body deselects everything
* Table rows are now scrolled into view when using up/down arrows
PR #21829.
`TorrentImpl::isDownloading()` was excessively broad which included unexpected events for the
case here. So use the underlying state directly.
Closes#21788.
PR #21836.
Fixes bug where the first time visiting Execution Log view all log levels are deselected but log items with all levels are still displayed.
This requires you to select a log level and then deselect it to hide that log level.
PR #21812.
Thin scrollbars are now used if they are supported by user's browser. The main goal was to make them less intrusive in Chrome-likes on some platforms.
PR #21763.
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
LocalPreferences class is now created using modern class syntax (minimal changes to remove Mootools bits). In addition, I removed redundant suffix from class name.
PR #21780.
This change displays the last detected IPv4 and/or IPv6 address(es) in the GUI and WebUI's status bar. This does not yet handle systems with multiple addresses of the same type (e.g. multiple IPv6 addresses).
PR #21383.
---------
Co-authored-by: Odin Vex <44311901+OdinVex@users.noreply.github.com>
There may be quite a few endpoint names (one for each available network card), and they usually remain unchanged throughout the session, while previously producing such names was performed every time they were accessed. Now they are retrieved from the cache.
PR #21770.
Those are the `default` cases which are not expected to hit (nor reachable) normally.
When the code is compiled with release mode and it reaches `Q_UNREACHABLE()`, it becomes
undefined behavior. So it rely on the developers to catch the errors in debug mode.
The upside of this is that the `switch` statement will be more optimized than not using it.
This also means the statements after `Q_UNREACHABLE()` isn't important. It allow anything to
preserve the intention of the code.
This macro is preferred over C++23 `std::unreachable` because it will automatically insert a
`Q_ASSERT(false)` with it.
PR #21752.
This fixes a bug where the torrents table header menu
could not be closed by clicking on a table row.
This also fixes the same bug for other context menus.
PR #21731.
This PR relies on flexbox to ensure all WebUI tables are the correct height without overflowing. Table headers are now always visible and JS-based dynamic resizing is no longer needed.
PR #21652.
Compared to plain function, arrow function is simpler to understand (without bindings to `this`, `arguments`, `super`) and to read.
Now, plain function will only be used when this object is required.
PR #21691.
The required JS may not yet be loaded, resulting in an error when calling `window.qBittorrent.Rss.init()`.
Signed-off-by: Thomas Piccirello <thomas@piccirello.com>
PR #21689.
Auto resize can be triggered by:
1. Double clicking the column's resize handle (its rightmost edge)
2. The table header's context menu
Closes#21627.
PR #21655.
This fixes a bug where the file filter is only shown when the Content tab is switched to. The filter is not being shown if the Content tab is already selected on page load (due to being previously selected).
PR #21657.
Simplify code by utilizing QSslConfiguration object.
Also don't mess with global default value via `QSslConfiguration::setDefaultConfiguration`. It
should not be done at such local class.
Also, by switching to template we can avoid the cost of converting to some specific type and
perfectly forward the parameter to the final function.
PR #21572.
The function already has a parameter named `result`.
Also remove a duplicate variable since it already has a pref pointer at the start of the function.
PR #21571.
It is enough to set them up just once during initial load. Number of elements with copyToClipboard class is fixed - they are context menu items.
PR #21558.
Box-sizing: border-box is now applied globally. A lot of tiny changes were made but they were necessary to correct resulting inconsistencies. Everything should be pretty much as it was with just some minor exceptions.
Looks like this PR also indirectly fixed#21414.
PR #21464.
This PR adds following improvements:
* Remove unused tracker entries while processing sync data
* Take into account filter selection & terms when performing 'Start/stop/delete' context actions in filter lists
Now, only filtered torrents will be affected by them, just like in the GUI.
* Provide better feedback when performing 'Start/stop/delete' context actions in filter lists
Small improvement over GUI - now these actions will be disabled if it's not possible to use them.
* Add context menu to status filter list
* Fix error when toggling filter title
Fixup for small bug introduced in https://github.com/qbittorrent/qBittorrent/pull/21269
PR #21438.
This help identifying threads when debugging.
The naming scheme is using 'class/function name + variable name'.
Note that the length limitaion is 16 chars on linux. On Windows, the limit is 32767 chars.
PR #21403.
router.utorrent.com has been dead for a long time. router.bittorrent.com died about a month or two ago. dht.aelitis.com doesn't work either. It is no longer possible to get DHT nodes from them.
Added router.silotis.us. Only ipv6!
PR #21296.
Just like in GUI, confirmation dialog shows up if it's possible to enable Auto TMM for any selected torrent. Right now it's not possible to properly test all cases in the WebUI because context menu completely hides TMM option when some torrents have it enabled and some not (no tri-state) - but that's something to add in another PR.
PR #21378.
Now drop action is only allowed on transfer list, previously it was on main window.
Having drop action on the whole main window is not preferred because it could allow drop action
on other unrelated widgets, such as execution log or RSS widget which is unexpected behavior.
PR #21332.
We're probably stuck offering the duo of RC_1_2 and RC_2_0 for some
time in the future. So hardcode the choices and make the Program Updater
choose the variant the user currently uses.
This change extends the Advanced section of the Preferences menu with a new field, allowing changing the time statistics save interval. A zero value will prevent recurrent saving.
This aims to provide the feature requested in issue #21285.
PR #21291.
Now they should fully match GUI behavior, please let me know if I missed something.
Still plenty of room to improve them further (e.g styling/CSS) but for now I wanted to keep the changes to the minimum.
Also included small tweaks to category context menu actions.
PR #21269.
SegmentHeap provides a faster malloc implementation that only available with Dynamic UCRT in Windows 10, version 2004 (build 19041) and later.
PR #21263.
A couple of tweaks to make them a little bit better:
1. Make highlighting functions more consistent (this also fixes minuscule bug when no filter item in tracker list is highlighted due to a type mismatch)
2. Use [event delegation](https://javascript.info/event-delegation) to handle filter toggling & item selection
3. Other minor improvements (everything should work like it was previously)
PR #21191.
This PR improves torrent deletion dialog.
1. Now shows different message depending on the number of selected torrents
2. Visually pretty much inline with the GUI
3. Adjusts to content on load
4. Now uses XHR load method. Panels / windows loaded using this method become part of the current document so there is no need to import styles or scripts (they should load marginally faster now).
PR #21185.
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
It is now possible to expand & collapse it by clicking directly on tabs, just like in GUI.
In addition, collapse state is saved and applied on page load.
Fixed one minor bug and now files search input is properly hidden even when panel is collapsed.
PR #21209.
The `event` object will be passed as the first parameter to the event handler. So wrap the
event handler with a closure to prevent `event` leaking to other functions.
This allows passing request_data to retrieve_url in order to create a post request.
PR #21184.
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
qbt only need to escape double quotes for the sake of HTML attributes. As for single quotes it
can leave them as-is since WebUI enforce using double quotes for strings.
PR #21180.
`innerHTML` & `outerHTML` setter will more or less evaluate the value which could be used to
inject malicious code. So replace them with safer alternatives.
PR #21163.
This PR makes it possible to see common category of selected torrents in context menu. Everything should behave exactly like in GUI.
Closes#12701.
PR #21136.
Remove the torrent row regardless of it being visible.
I've also removed the return value because:
* it doesn't appear to be used by any caller;
* other functions (e.g. updateRowData) do not return any value;
* it's not clear whether true refers to the torrent being removed from the list of all torrents or just the visible ones.
Closes#21070.
PR #21071.
`setInterval()` will always fire a new timeout regardless previous `updateRssFeedList()` has
completed or not. This patch will now wait for previous request to complete before another
timeout.
Notable changes:
1. Prevent excessive engine module imports.
2. Replace trivial usage of `join()`.
3. Keep the output text sorted whenever possible.
4. Close handles properly.
5. Print error to stderr, not stdout.
6. Report search job exit code.
7. Print exception message to stderr if exception was thrown when
running a search job.
8. Utilize XML library to build XML data
And use 2 spaces as indentation.
PR #21098.
It does not affect the produced artifacts. The only difference is the
tool itself won't depend on some specific OS image or library version.
PR #20983.
Fixes the download progress calculation for folders with zero size.
Previously, the progress would be Zero. Now, folders with zero size
show 100% progress.
PR #20567.
1. Previously unhandled connections will stay in pending state. It won't
be closed until timeout happened. This may lead to wasting system
resources. Now the (over-limit) connection is actively rejected.
2. When out-of-memory occurs here, reject the new connection instead of
throwing exception and crash.
3. Also clean up some unused bits.
PR #20961.
The version calculation is an estimation and it will drift off after some time. Hopefully the
drift offset won't be noticeable within a few years.
Also switched the user agent to Windows 10 which has the largest portion of users to avoid
standing out from the crowd.
PR #20864.
Restructures the code to separate the basic logic from the logic that depends on the parameters and properties of the torrent being added.
Also fixes "Never show again" checkbox functionality.
PR #20848.
* Simplify nova2dl script
* Use search engine name instead of site URL (like nova2 does)
* Add a way to download torrent using search plugin
PR #20824.
Adds a date column to the built-in search engine to show when a torrent was published/uploaded on the engine site.
When a plugin wants to show a date, it can now add a `pub_date` entry to its result dict. The value format is a unix timestamp (an integer representing seconds since epoch).
Plugins with no date support will keep working.
PR #20703.
Prevents overwriting of the stored layout in case the main window was hidden at startup and
has not been shown since, because incorrect dimensions can be provided by it in this case.
PR #20725.
Closes#20720.
This PR improves touch interaction with table rows that have a context menu. Previously, those rows couldn't be selected or scrolled on mobile. Additionally, this PR modifies the context menu to appear when the user removes their finger/touch, rather than the current behavior of appearing mid-touch. This allows us to only display the context menu if the user's finger remains on the same element, which should significantly reduce erroneous context menu triggering.
Closes#19819.
Closes#19820,
Closes#19823.
PR #20639.
There were a few reports that the user has messed up their browser's language and this PR gives an escape hatch in case the user is unable to configure the browser's language for various reasons.
Example for choosing French: http://127.0.0.1:8080/?lang=fr
PR #20591.
This prevents hitting a TypeError when the category stored in localstorage does not exist. The behavior for a nonexistent category now mirrors that of a nonexistent tag or filter - no option is selected and no torrents are shown.
Closes#20623.
PR #20638.
This PR fixes various accounting issues with the trackers list. Removing a torrent would not update the trackers list, nor would removing a tracker from a torrent. And removing a tracker with a shared host but unique url (e.g. example.com/1 and example.com/2) would erroneously remove the tracker's host from the list.
Closes#20053.
Closes#20054.
PR #20601.
This PR adds support for running multiple concurrent searches in the Web UI. This is already supported in the GUI as well as by the Web API. Behavior mimics the GUI as closely as possible.
All filters and sorting are preserved per-tab, allowing you to apply unique filters and sorts to each of your searches. Row selection is also preserved across tab navigation.
Closes#12840.
PR #20593.
The 'SSL torrent' feature is not standardized. I.e. there are no BEP (BitTorrent Enhancement Proposals) associated with it, so we do not greatly encourage its usage as it will only work with libtorrent clients and derivatives. It will not work with other torrent clients that do not support the libtorrent specific implementation.
This PR aims to provide minimal support for those who need SSL torrents. Furthermore, it is intended that there will be no UI support (nor indication) of adding/creating SSL torrents.
* Prerequisites:
I omit the instructions of creating those files as the intended audience (experts & advanced users) should have no problem with it. All files are as follow:
1. Root (torrent publisher) certificate
2. Root private key
3. A .torrent file created with root certificate
5. Peer certificate (signed by the root certificate)
6. Peer private key
7. Diffie-Hellman parameters file
All files are stored in .pem format.
* Enable SSL torrent protocol in qbt
There are 2 hidden keys to put in qbt config file, under `[BitTorrent]` section:
1. `Session\SSL\Enabled`: set it to `true`.
2. `Session\SSL\Port`: set it to some unused port or omit the key entirely to let qbt pick one for you.
* Add an SSL torrent to qbt
The only way of adding an SSL torrent is via WebAPI. The `/api/v2/torrents/add` endpoint will support 3 additional parameters. You must provide them for an SSL torrent.
1. `ssl_certificate`: Contents of the peer certificate file (in PEM format).
2. `ssl_private_key`: Contents of the peer private key file.
3. `ssl_dh_params`: Contents of the Diffie-Hellman parameters file.
* Change the SSL parameters to a torrent
In case you provided wrong SSL parameters when adding a torrent, there is a new endpoint `/api/v2/torrents/setSSLParameters` that you can update the SSL parameters. The parameters (`ssl_*`) are the same as `/api/v2/torrents/add` endpoint.
* Query the SSL parameters of a torrent
There is a new endpoint `/api/v2/torrents/SSLParameters` that you can query the SSL parameters of a torrent.
References:
* https://www.libtorrent.org/manual-ref.html#ssl-torrents
* https://blog.libtorrent.org/2012/01/bittorrent-over-ssl/
PR #20338.
---------
Co-authored-by: Radu Carpa <radu.carpa@cern.ch>
* Use compiler generated comparison function
* Use designated initializers
* Convert to proper type
* Use reference
* Remove redundant text
The `msg` already contain the text `Reason:` so it isn't needed.
PR #20312.
1. Use proper case folding function instead of `toLower()`.
2. Use locale aware comparison instead of comparing unicode code points.
Now `a` comes before `A` which is the same as the result from QCollator. A nice side effect
is now it properly compares locale specific characters (for example `C`, `Č`).
3. Improve testing. Now the test is runnable and stable on all platforms.
PR #20208.
Add a 'remember choice' button to the WebUI Torrent Deletion dialog that sets the default file deletion setting. The setting is shared with GUI, so if you set it in WebUI and open the Qt app, the 'delete files' checkbox will match WebUI (checked or unchecked).
PR #20150.
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
According to https://doc.qt.io/qt-6/qcollator.html#posix-fallback-implementation
The 'POSIX fallback implementation' is only used when ICU is not available. So the correct way is to detect ICU directly and not depend on the OS. The exceptions are macOS and Windows since they support the required functionalities natively.
Closes#20205.
PR #20207.
Sometimes users had not properly configured their system locale and thus
qbt will specify a default locale just in case.
Closes#16127.
Closes#19609.
Closes#19834.
PR #20203.
lukka/run-vcpkg v11.3 has deliberately changed to avoid writing outside of `GITHUB_WORKSPACE`
directory and this conflict with our usage. So ditch it and invoke vcpkg directly.
https://github.com/lukka/run-vcpkg/releases/tag/v11.3
PR #20202.
For GUI and non-daemon console, the legal notice won't ask for user acceptance anymore and only
provide an OK button (or Enter key in console) from now on.
For daemon mode, qbt will print the legal notice and continue to run. It will also notify user
to use command line option `--confirm-legal-notice` to suppress the message. The message will be
printed on every start up unless user specify the command line option once.
PR #20080.
The C libraries is now updated by the OS and therefore there is no
reason to bundle static versions which might be outdated later.
Also enable Control Flow Guard for 3rd party libraries.
`choco install` is slow: A basically simple download and extract operation takes 20sec compared to ~3sec
when done manually. So we add a conditional for it.
Given the amount of PR and compile matrix, the CI cache size limit is
easy to hit. So for now on, only store compile cache for stable branches
to avoid cache thrashing.
The parent widget of lockMenu is going to be used to derive the
transient parent window. Currently the parent widget of lockMenu is
the main window, therefore the main window is also going to be the
transient parent for lockMenu's window handle.
In other words, the "View" menu and "Lock qBittorrent" menu are
going to be considered as siblings by the window manager even though
the latter is nested inside the former.
On platforms like wayland, such popup hierarchies are illegal, popups
must be properly nested. qtwayland works around it, but it also prints
warning messages.
This change makes lockMenu a child of the view menu so they are
properly nested from the window manager point of view.
PR #19967.
Closes#19955.
This suppresses compiler warnings in GHA CI:
>ld: warning: direct access in function 'std::__1::__function::__func<libtorrent::storage_interface* (*)(libtorrent::storage_params const&, libtorrent::file_pool&), std::__1::allocator<libtorrent::storage_interface* (*)(libtorrent::storage_params const&, libtorrent::file_pool&)>, libtorrent::storage_interface* (libtorrent::storage_params const&, libtorrent::file_pool&)>::target(std::type_info const&) const' from file '/usr/local/lib/libtorrent-rasterbar.a(create_torrent.cpp.o)' to global weak symbol 'typeinfo name for libtorrent::storage_interface* (*)(libtorrent::storage_params const&, libtorrent::file_pool&)' from file 'src/base/libqbt_base.a(mocs_compilation.cpp.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
And also makes the binary a bit smaller.
https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gcc/Code-Gen-Options.html#index-fvisibility
PR #19921.
Here is some benchmark for various archive formats:
```
gz
0m11.384s
0m11.495s
0m11.193s
zip
0m14.159s
0m14.416s
0m13.917s
7z
0m17.569s
0m17.295s
0m18.496s
bz2
0m31.519s
0m28.885s
0m29.510s
```
Looking by compressed size, bz2 is the best. However its decompressing
speed is the slowest. bz2 and gz file size only differs by ~20MB
and this difference is neglectable given the network speed on
Github. So switch to gz format to speed up CI build time.
PR #19867.
Mobile Safari on iOS does report `ios` platform, but iPadOS reports `mac`
instead. It is common sense to check for touch points when this happens
to differentiate Mac and iPad.
PR #19822.
Closes#19057.
---------
Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
The overlay scrollbars introduced in Firefox 100 take up no space,
breaking the existing overflow detection.
Add an extra check for `scrollHeight != clientHeight` which is able to
detect an overflow independent of scrollbar style.
PR #19779.
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
Otherwise, there is a conflict of run-time libraries used (since Qt DLLs are still use dynamic MSVCRT) that leads to strange errors.
PR #19718.
Closes#19701.
The `repo` value will be used by `git clone` command and therefore the
URL should end with `.git` for repos on Github.
https://pre-commit.com/#repos-repo
PR #19710.
* Use correct pointer type in NSIS scripts
* Only remove qbt specific registry keys when uninstalling or disassociating
* Set .torrent Content Type when associating .torrent format
* Move ".torrent association" functions to Utils::OS class
PR #19709.
Allows you to bring the main window to the front when one or more "Add new torrent" dialogs are open.
Also allows you to minimize/maximize the "Add new torrent" dialog.
PR #19670.
Closes#17919.
Prevents qBittorrent from being failed to start after torrents database metadata is corrupted by one of the first releases of v4.5.x series.
PR #19668.
Closes#19622.
* Fixes a couple of memory leaks (although not dangerous in practice, since we are talking about objects with a lifetime up to the end of the application)
* Fixes heap use after free
PR #19650.
Closes#19632.
Improves "Metadata received" stop condition handling by "Add new torrent" dialog.
The problem is when "Metadata received" stop condition is set the metadata can still be received 0.1 sec before clicking the "OK" button so torrent is actually added with metadata and therefore it cannot respect "Metadata received" stop condition.
The solution is to uncheck "Start torrent" checkbox once metadata is received.
PR #19597.
Closes#19583.
PR #19496.
* Add torrent entry status to represent tracker error
* Add torrent entry status to represent unreachable endpoint
* Display tracker entry next/min announce time
* Reset tracker entries when torrent is stopped
Warning: users are at their own discretion to create .torrent with >= 64 MiB piece size as not
every torrent client supports it.
Larger piece sizes are only available when using libtorrent 2.x. libtorrent 1.x is not
efficient with memory usage and in order to avoid user complaints it is limited to 128 MiB.
Also note that, as of this writing, libtorrent 2.0.9 has an internal limitation that only
allows loading maximum 256 MiB piece size. And therefore > 256 MiB size options are forbidden
for now.
Closes#19527.
PR #19535.
The change is in preparation for adding the possibility to create
torrent files via the API.
Rework TorrentCreatorThread to be a more lightweight QRunnable class.
The parameters are now defined on construction time and are fixed
throughout the lifecycle of the TorrentCreator. The lifecycle of the
object is not bound to the one of QDialog anymore; it is now handled
by the QThreadPool. This will enable easier queueing of multiple torrent
creation jobs without risk of spawning many threads.
PR #19500.
PR #19468.
* Use QHash to map tracker endpoints
* Don't clear numPeers unexpectedly
* Remove outdated tracker entry endpoints
* Move presentation logic from Core to GUI code
* Show all endpoints per tracker in tree structure
---------
Co-authored-by: Kacper Michajłow <kasper93@gmail.com>
Changing the data may affect the layout of the sort/filter model, which in turn may invalidate the indexes previously obtained from selection model before we process them all. Therefore, we must map all the selected indexes to source before start processing them.
PR #19372.
Closes#19359.
`Algorithm::removeIf()` is still valuable as `QHash::removeIf()` predicate require an
iterator or a `std::pair`, which both require more code to unpack the variable and therefore
cumbersome to use.
PR #19353.
This separates browsing context for different origin sites and prevents
leaking data from it.
This header is only present when using built-in WebUI. Alternative WebUI
is not affected.
https://web.dev/why-coop-coep/#coop
PR #19157.
It now guards against reading infinite files such as `/dev/zero`.
And most readings are bound with a (lax) limit.
As a side effect, more checking are done when reading a file and
overall the reading procedure is more robust.
PR #19095.
Since appimage is bundling the libraries it make sense to embed libtorrent statically into qbt binary.
Another side effect is now qbt binary includes debug symbols from libtorrent too (which I consider a good thing for debugging). Previously appimage seems to (unnecessarily) strip the libtorrent debug symbols.
PR #19014.
Since standard library could have platform dependent specialized hashing functions.
Also the main idea is to let `qHash` handle whatever integer type `std::hash` returns and mix it with `seed` accordingly.
PR #18715.
We have to force update the cached state, otherwise someone will be able to get an incorrect one during the interval until the cached state is updated in a regular way.
PR #18579.
Closes#18559.
MooTools More has CVE-2021-20088 and qbt is affected by it by using the
unsafe function call `String.parseQueryString()`, so migrate away from
it.
PR #18554.
The implementation of QTimer::singleShot() uses Qt::PreciseTimer if interval is less than 2 seconds. This isn't mentioned in the docs.
Qt::PreciseTimer increases the system's timer resolution which negatively affects power consumption.
PR #18555.
Closes#18350.
Adjusting limits was made based on the belief that "forced" torrents (internally used for prefetching metadata)
are still under limits, but ignore only the queue. This is not really the case. "Forced" torrents ignore the limits
like "maximum active torrents/downloads", so adjusting limits is not required, and what's more, it really causes the
problem of unexpectedly activated previously queued torrents when adding some magnet using "Add new torrent" dialog.
PR #18503.
Fixes#18490.
Don't want torrent search history to pop up next time you try to search for torrents, right?
There are people who would search for 18+ content and what they searched would load up next time they are about to search.
PR #18285.
Replace current "Start qBittorrent minimized" option with "Initial window state" that allows to start qBittorrent as "hidden in system tray" while retaining regular "minimize to panel" functionality.
PR #18252.
Closes#487.
The javascript implementation of multi-select menu is from the source
https://github.com/PhilippeMarcMeyer/vanillaSelectBox. It is licensed
under the MIT License. Some minor fixes is made to pass the lint.
Co-authored-by: brvphoenix <30111323+brvphoenix@users.noreply.github.com>
Co-authored-by: ttyS3 <ttys3.rust@gmail.com>
PR #18290.
Use more appropriate container (QList) for resume data queue buffer.
QVector in Qt5 has poor performance of the first element taking operation,
which is used to process the resume data queue. In Qt6, QVector is just an
alias for QList, so there was no problem there.
PR #18387.
Fixes#18341.
Such helpers do not make practical sense, since they can be trivially implemented on top of the base interface, but at the same time they can lead to undesirable consequences when some calling code requires slightly different behavior than another.
PR #18367.
Fixes#18338.
Upload an AppImage artifact on CI builds. This AppImage is a
simplified version of the official one. It is meant to help
with debugging PRs that fix issues.
Otherwise it is destructed in QObject destructor, i.e. after GUI application is already destructed.
This can be related to some problems with system tray icon.
PR #18108.
Closes#18093.
Use another workaround to update files tree view
This is alternative approach to #17786. It uses the similar workaround as was used a long time with Qt5 and stoped working with Qt6 so it is adjusted in this PR.
Also this fixes content model resetting handling.
We don't really need to get currently used settings pack in order to apply changes to session settings. It is enough to apply settings pack that contains only updated settings.
PR #17989.
This adds a confirmation dialog to Pause All and Resume All. First I wanted to only add it in Tray, but honestly, clicking around in the menu, using hotkeys might trigger it just as easy.
Closes#17683.
PR #17945.
This eases the usage of port forwarder as the caller code doesn't need
to store previous used port and now can rely on port forwarder doing
all the hard work.
PR #17967.
Add a UI option for "Use proxy for hostname lookup" option and plumb
it into libtorrent's settings_pack.proxy_hostnames option. This is
available for SOCKS5 and HTTP proxies, and defaults to true, which
is the previous functionality. Hostname lookups can be forced to be
local by unchecking this option, which can aid compatibility with
certain non-compliant proxy servers.
Closes#17902.
PR #17904.
Co-authored-by: Nathan Lewis <saturn@saturn49.dyndns.org>
This commit introduce color palettes from Primer and make use of it in various widgets.
Primer system is chosen due to well designed and is highly rated on Github (in terms of
Github stars).
https://primer.style/
PR #17798.
When shutting down, instead of waiting for all types of alert from
libtorrent, now it only waits for specific alert types. This potentially
help shorten the shutdown waiting time.
This allows user to drag and drop .torrent files and URL links onto the
main window and will open the respective dialog.
Dropping folders are not supported due to technical reasons.
Closes#6038.
Because sometime (when your save and download path are on different drives, when your disk drive is super busy, ...) move operations can stack up, I add this "Moving" status filter so you can see in a blink of the eye which torrents are in a move state.
PR #17810.
PR #17814.
Closes#17792.
Closes#929.
(Actually it should close all issues about lack of ability to stop torrent after metadata downloaded or after files are initially checked.)
Also makes explicit the temporary start of the torrent in the case when recheck of the stopped torrent is performed.
The lt::status_t::file_exist is returned when lt::move_flags_t::fail_if_exist is used, which means the whole move operation failed. So hanlde this condition correctly (even if the fail_if_exist isn't used in the code base currently).
PR #17853.
There's really nothing to move if the torrent still doesn't have metadata.
Additionally, such torrents in the queue can lead to unexpected behavior
when reloading the torrent after metadata is received.
PR #17823.
Replaced QDesktopServices by native Windows function
to open destination folder due to QDesktopServices issues on Windows.
The issues are described in #17482 and even more detailed in #17025.
Closes#17482.
PR #17723.
The color is either from qbt theme pack or desktop environment.
Note that Windows default theme do not use highlighted text color.
Other themes (either OS default or qbt themes) are closer to native
look when highlighted text color is in action.
* Now it allow user to add tracker to different tier.
* The downloaded trackers are now displayed as is (without modifying).
* Now the dialog remember dialog size and last used URL.
Closes#17692.
PR #17668.
This is a continuation of #17576.
Handles the case when you add hybrid torrent by v1-only magnet link and this torrent is already known by its full hybrid info hash (i.e. by both v1 and v2 info hashes).
libtorrent < 2.0.7 has a bug that add_torrent_alert is posted too early
(before torrent is fully initialized and torrent extensions are created)
so we have to fill initial torrent data in add_torrent_alert handler.
PR #17491.
Now we can write `Version<int, 3, 1>(1)` and provide only 1 parameter
instead of all 3 parameters at once at the constructor. Note that for
this instance of `Version` 3 numbers were specified but only 1 is truly
mandatory.
The added code are required to specify conditions of the template
instantiation for the compiler.
Currently Docker Inc. recommends installing Docker Desktop instead of the CLI.
docker-compose has been deprecated, replaced by docker compose.
PR #17448.
If the "Accept-Encoding" is not manually specified, it will be
automatically set to the supported encodings by QT and the reply data
will also be automatically decompressed in this case. Setting
"Accept-Encoding" manually will disable the "autodecompress" feature
before QT 6.3.0. Although QT 6.3.x has different behaviors, let QT
specify the "Accept-Encoding" and we will always obtain the decompressed
data.
The macro "QT_NO_COMPRESS" defined when QT is compiled will disable
the zlib support. We can manually address this exceptions.
PR #17438.
Sometimes tracker may respond with 0 for num_complete and num_incomplete and we should display that instead of deducing the peer count from peer list. We should only fallback to peer list if tracker does not respond with any information. In such cases num_incomplete and num_complete is set to -1 by libtorrent.
PR #17432.
For non-existent directories (which will be created on demand) `Utils::Fs::freeDiskSpaceOnPath`
will return invalid value so instead query its parent path.
Problem statement: user sees its email address in email notification,
while it is better to have sender field app-personalized, like it did
in Nextcloud: they send notifications from user's email address and
add alias 'Nextcloud' to it.
This patch adds alias 'qBittorrent' to qBittorrent email notifications,
so user sees more user-friendly email notification.
PR #17374.
The graphs are showing 0 for both payload upload & download rate but
torrent statistics aren't, so suppress it manually.
The workaround only applies to paused state for now.
Closes#17294.
Fix PVS-Studio issue "rss_autodownloader.cpp:111: warning: V668
There is no sense in testing the 'm_fileStorage' pointer against null,
as the memory was allocated using the 'new' operator.
The exception will be generated in the case of memory allocation error".
PR #17347.
Since the application icons are already installed in
the global XDG hicolor theme, simply stop installing the 128px one
in the pixmaps location.
PR #17342.
* Downgraded macOS CI to Qt 6.2.0 due to a bug in Qt Test module
* Revised cmake build scripts
* For now, only building via cmake is supported
PR #17338.
1. Initialize Logger class earlier so that it can record messages from other classes (for
debugging purpose).
2. Deprioritize WebUI port adjustment. It is not a high priority in here.
3. Slightly deprioritize file logger initialization.
This is observed by unusual high page faults when the stuttering occurs.
With this workaround, the high page faults still occurs but the GUI remains responsive.
Reduce the total startup time of the application and maintain sufficient responsiveness of the UI during startup due to the following:
1. Load resume data from disk asynchronously in separate thread;
2. Split handling of loaded resume data in chunks;
3. Reduce the number of emitting signals.
PR #16840.
In some unknown way, the one line in Objective-C affects Qt's main
loop causing the crash in QApplication::exec() on processing next
event after that call.
Even crash doesn't happen exactly after this call, it will happen
on application exit. Call stack and disassembly are the same in
all cases.
But running that code in another thread solves the issue.
The goal is to improve responsiveness of qbt when CPU resources are scarce.
Instead of lowering libtorrent threads priority, it is chosen to raise main event loop thread
priority to avoid getting messy with libtorrent internals.
Also on Windows, threads doesn't inherit thread priority from the parent thread and it always
use the default (normal) priority.
PR #17278.
Fix cannot create torrent when the source file is at the root of a
drive.
Fix created torrent cannot be seeded when the source file is at the root
of a drive.
Fix up dd1bd8ad10.
Closes#17279.
Make notifications clickable on Linux by assigning "default" action.
Don't react to unrelated notifications clicked by keeping track of qBittorrent notifications IDs and filter out unrelated ones.
Make D-Bus Notifications interface proxy class to be maintained manually and fix coding style in it.
Closes#9084.
PR #17282.
You can already control the cache size in libtorrent 1.2.x so it doesn't make sense to implement this limit for all use cases. Also there are some downsides to using working set size to limit memory usage such as unresponsive GUI when limit gets hit.
PR #17275.
This isn't necessary since it can cause issues by doing unnecessary reannounce during startup and network address refresh. This impact of this can be great if it happens on a regular basis and if someone has a lot of torrents.
PR #17261.
The port can be optionally specified by appending `:<port>` to the existing SMTP Server field in settings. If no port is specified, then the default port (25 for insecure or 465 for SSL) is used.
Closes#12212.
PR #17157.
Blacklist filtered file names from being downloaded from torrent(s).
Files matching any of the filters in this list will have their priority automatically set to "Do not download".
See Options > Downloads >Do not download.
Closes#3369.
PR #17106.
It uses lupdate directly.
Qt's `qt_add_lupdate()` cmake function doesn't help much.
First of all it is Qt6 only.
Secondly, our project is split into multiple targets but we need all
strings into a single .ts file per language.
Thirdly, it looks like it will skip source files that are added conditionally into the build
via cmake condition checking (eg DBUS source files). We need to gather all strings present
in the source files regardless of the build configuration.
On another note, this is a step towards reducing dependency on qmake/autoconf.
In glob patterns, square brackets have a special meaning, that may be unexpected by the users.
Thus we escape these brackets, so that the only remaining special characters are the * and ? wildcards.
PR #16965.
This patch allows user to switch disk IO type between memory mapped files based type (default in libtorrent 2, and seems causing memory issues) and POSIX-compliant type which is more conservative on memory usage.
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
Co-authored-by: Vladimir Golovnev (Glassez) <glassez@yandex.ru>
PR #16895.
When torrent is added without metadata libtorrent doesn't honor "seed mode" and doesn't save it in resume data so when metadata is available torrent will still check file hashes. This patch will add a logic that preserves originally enabled "seed mode" until the metadata is received.
PR #17009.
* Added keyboard navigation keys for context menu with `&`
* Added `CTRL+M` for force resume.
PR #16988.
Co-authored-by: itLezy <itLezy@users.noreply.github.com>
Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
msys2 was reporting the following error:
```
D:/a/qbittorent_msys2/qbittorent_msys2/src/qBittorrent/src/app/application.cpp: In member function 'void Application::applyMemoryWorkingSetLimit()':
D:/a/qbittorent_msys2/qbittorent_msys2/src/qBittorrent/src/app/application.cpp:777:36: error: no matching function for call to 'min(unsigned int, long unsigned int)'
777 | const SIZE_T minSize = std::min((64 * MiB), (maxSize / 2));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
This is a prerequisite for using boost stacktrace.
Note that this is not the first version that introduces boost stacktrace but the version that
should be stable enough.
PR #16986.
* Improves code readability.
* Improve documentation.
* Fix "docker stop" doesn't terminate qbt gracefully which could lead to
data corruption.
* Provide correct/working bittorrent listening port by default.
* Make use of qbt profile option instead of hacking environment
variables.
* Simplify build steps.
PR #16976.
It uses the latest available version for libtorrent and builds both libtorrent and qBittorrent with Cmake + ninja
The legal notice must be accepted trought an environment variable called LEGAL and passed to docker when the container is run, to set it true one must set "LEGAL=accept"
PR #16828.
Avoid some blocking calls to libtorrent
Under some conditions (when libtorrent is doing heavy work), blocking calls can wait quite a long time, thereby suspending the main application thread. In some cases, we can avoid this, since we have enough data to make the job without call to libtorrent. Although in some cases it may require a little more work to be done in the main thread, but overall responsiveness still benefits greatly in the end, especially when the libtorrent working thread is heavily loaded.
Fix web API returning Not Found instead of Forbidden.
When not having a session the API would return "Not Found" instead of "Forbidden" when trying to access a non-public endpoint.
PR #16866.
This is mainly to avoid dangerous code pattern: getting an iterator on a
temporary object. Previously `data()` returns a const reference so the
code wasn't doing any harm.
This is to allow re-checking of multiple torrents simultaneously. This will benefit users who
have multiple disks or SSD.
Closes#15296.
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
most of the time hash string is not needed and InfoHash is often used as
temporaries for torrent searching in handling of torrent alerts. This
improves the creation time of Infohash
This will allow users to perform action on all torrents with a single click instead of having to select all with ctrl+A or other cumbersome ways. Basically it copies the function found in tracker/category filters.
Closes#13398.
PR #16547.
Currently you can't directly change the priority of a partially completed multi file torrent. You'll have to start downloading those files and then change their priority.
Closes#10994.
Closes#8673.
PR #16546.
This improves readability and may allow users to match log message with
better accuracy.
Now log message is consisted of 2 parts:
The first part is a short sentence describing the event. It should avoid
writing out the specifics of the event as it will be described in the
next part of the message. The sentence should use correct tense of the
event.
The second part consist of `Name: Value` pairs which will provide
sufficient info for the event.
Note that none of the message parts is mandatory, one of them can be
omitted when the resulting log message is clear enough.
PR #16437.
This checks that `category_list[categoryHash].torrents` is truthy before dereferencing it. In some cases the API response will have a torrent in a category that doesn't exist resulting in the check to return `undefined` which is not `null`. This broadens the check so that it will create the category even if null.
PR #16432.
Speedup access to file priorities by avoiding extra blocking call to libtorrent thread.
Improve the Torrent interface by hiding the asynchrony of file priority changes behind the scenes.
PR #16425.
This method takes constant time and is less prone to (CPU) pipeline stalling due to less
computation. Also it is slightly faster than the previous method.
It did not work correctly, since it assumed that 'lt::torrent_plugin' is created at an earlier stage and is able to track all changes in the torrent state, but in reality it turned out that it was created after the torrent moved to the `downloading_metadata` state, so we had to additionally handle it in the constructor.
PR #16121.
qBittorrent is a single-window application.
By marking it as such desktop environments know to not offer to open
a new window for it.
This is a new standard key intruduced in
3ea3bc26e2
PR #15996.
Suppresses the following warning:
qBittorrent/src/base/bittorrent/categoryoptions.cpp: In static member function ‘static BitTorrent::CategoryOptions BitTorrent::CategoryOptions::fromJSON(const QJsonObject&)’:
qBittorrent/src/base/bittorrent/categoryoptions.cpp:44:59: warning: missing initializer for member ‘BitTorrent::CategoryOptions::DownloadPathOption::path’ [-Wmissing-field-initializers]
44 | options.downloadPath = {downloadPathValue.toBool()};
Change "Incomplete/temp folder" term with "download folder".
Allow to set "download folder" per torrent (in manual mode) and per category (in automatic mode).
For writing, this ensures expire handler won't be executed in a small
time window, that is after `m_socket->write()` and before
`QIODevice::bytesWritten()` signal.
For reading, this let the socket to have the chance to process the
received data instead of dropping it.
PR #15849.
This also suppresses the following clang warning:
warning: definition of implicit copy assignment operator for 'Version<unsigned short, 2>' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
Apply the new priority after picking it via drop-down menu.
Fixes#14667, #15238.
PR #15739.
Co-authored-by: a-sum-duma <68896601+a-sum-duma@users.noreply.github.com>
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
Current item priority is compared against new checkbox state. I believe the intention was to check if the priority changes before performing further actions. This PR fixes the issue - compare priority against new value that is about to be set rather then the checkbox state.
PR #15740.
Some linux distros seem to alter TMPDIR environment variable and
therefore hamper qbt ability to find the lock files. So use config
folder instead of TMPDIR folder to create/locate the lock files.
Note that this change will also make qbt become one instance per-user
instead of one instance per-system.
Closes#15646.
Fix improper sorting of the list of files contained by a torrent.
Always load all torrent content data so that the files list can be sorted properly.
Load torrent content only when needed. Don't load the list of files contained by a torrent if the list widget is not visible.
PR #15604.
This functionality wasn't ever correctly implemented and couldn't be
done without considerable effort, so revert it for now.
This reverts commit 4ac25a50ed.
PR #15542.
Previous default was 500MB and it couldn't fit all compile results in
it, enlarge it to 2GB. Note that 2GB isn't the actual size stored on the
server, it will be compressed again by zstd and will be a lot smaller.
Now it builds boost, libtorrent manually and we have control over its
version.
Enable build matrix for libtorrent versions.
Reorganized the folder/file layout in built artifact.
Minimizing columns no longer truncates text from the left, now elides
text from the right for better readability. Done by setting header's
textElideMode to Qt::TextElideRight.
Fix issue #14419.
PR #15366.
################################## IMPORTANT ##################################
As you read and fulfill each of the following requirements below,
put an "x" between the square brackets to mark each task as done, like so: [x]
-->
- [ ] I have read the **issue reporting section** in the [contributing guidelines](https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md), so I know how to submit a good bug report with the required information
- [ ] I have verified that the **issue is not fixed and is reproducible** in the **[latest version](https://www.qbittorrent.org/download.php)**
- [ ] (optional but recommended) I have verified that the **issue is not fixed and is reproducible** in the **[latest CI build](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci.yaml?query=branch%3Amaster+event%3Apush)**
- [ ] I have **checked the [frequent/common issues list](https://github.com/qbittorrent/qBittorrent/projects/2)** and **searched** the issue tracker for similar bug reports (including closed ones) **to avoid posting a duplicate**
- [ ] This report is **not a support request or question**, both of which are better suited for either the [discussions section](https://github.com/qbittorrent/qBittorrent/discussions), [forum](https://qbforums.shiki.hu/), or [subreddit](https://www.reddit.com/r/qBittorrent/). The [wiki](https://github.com/qbittorrent/qBittorrent/wiki) did not contain a suitable solution either
- [ ] I have **pasted/attached the settings file and relevant log(s)** in the **Attachments** section at the bottom of the report. Mandatory: the settings file and at least the most recent log. See [this wiki page](https://github.com/qbittorrent/qBittorrent/wiki/Frequently-Asked-Questions#Where_does_qBittorrent_save_its_settings) if you're not sure where to find them.
## Description
<!--
################################## IMPORTANT ##################################
Delete each "(type here)" indicator and type your text in their place in the subsections below.
You MUST fill in ALL subsections marked with "(type here)" with the appropriate information.
Please make sure the description is worded well enough to be understood.
Provide steps to reproduce the issue, any additional relevant information, suggested solution (if applicable) and as much context and examples as possible.
For more information consult the Contributing Guidelines at https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md.
Do not forget about the mandatory attachments!
Use the Preview tab before posting to make sure your report looks like it is formatted properly.
You don't need to delete these comments, they won't show up in the final post.
-->
### qBittorrent info and operating system(s)
<!--
IMPORTANT:
if you did not get the qBittorrent installer from the links in the official website
or if you did not install it from the PPA, please mention that after the version
-->
- qBittorrent version: (type here)
- Operating system(s) where the issue occurs: (type here)
### If on Linux, `libtorrent-rasterbar` and `Qt` versions
- Qt: (type here)
- libtorrent-rasterbar: (type here)
### What is the problem
(type here)
### Detailed steps to reproduce the problem
1. (type here)
2. (type here)
3. (etc.)
### What is the expected behavior
(type here)
### Extra info (if any)
(type here)
## Attachments
<!-- paste file contents here (or attach the files if they are big), do NOT link to external sites -->
description:File a bug report to help improve qBittorrent user experience.
body:
- type:markdown
attributes:
value:|
#### ADVISORY
"We do not support any versions older than the current release series"
"We do not support any 3rd party/forked versions e.g. `portableapps`/`Enhanced Edition` etc."
"Please post all details in **English**."
#### Prerequisites before submitting an issue!
- Read the issue reporting section in the **[contributing guidelines](https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md)**, to know how to submit a good bug report with the required information.
- Verify that the issue is not fixed and is reproducible in the **[latest official qBittorrent version](https://www.qbittorrent.org/download.php).**
- (Optional, but recommended) Verify that the issue is not fixed and is reproducible in the latest CI (**[macOS](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_macos.yaml?query=branch%3Amaster+event%3Apush)** / **[Ubuntu](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_ubuntu.yaml?query=branch%3Amaster+event%3Apush)** / **[Windows](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_windows.yaml?query=branch%3Amaster+event%3Apush)**) builds.
- Perform a **[search of the issue tracker (including closed ones)](https://github.com/qbittorrent/qBittorrent/issues?q=is%3Aissue+is%3Aopen+-label%3A%22Feature+request%22)** to avoid posting a duplicate.
- Make sure this is not a support request or question, both of which are better suited for either the **[discussions section](https://github.com/qbittorrent/qBittorrent/discussions)**, **[forum](https://qbforums.shiki.hu/)**, or **[subreddit](https://www.reddit.com/r/qBittorrent/)**.
- Verify that the **[wiki](https://github.com/qbittorrent/qBittorrent/wiki)** did not contain a suitable solution either.
- type:textarea
attributes:
label:qBittorrent & operating system versions
description:|
Qt and libtorrent-rasterbar versions are required when:1. You are using linux. 2. You are not using an official build downloaded from our website.
Example of preferred formatting:
qBittorrent:4.6.6x64
Operating system:Windows 10 Pro x64 (22H2) 10.0.19045
Qt:6.4.3
libtorrent-rasterbar:1.2.19
placeholder:|
qBittorrent:
Operating system:
Qt:
libtorrent-rasterbar:
validations:
required:true
- type:textarea
attributes:
label:What is the problem?
description:Please add the "crash report" (if encountered) or give a clear and concise description of problem.
validations:
required:true
- type:textarea
attributes:
label:Steps to reproduce
description:Please provide reliable steps to reproduce the problem.
placeholder:|
1. First step
2. Second step
3. and so on...
validations:
required:false
- type:textarea
attributes:
label:Additional context
description:Add screenshots etc. (Anything that will provide more context about the problem)
validations:
required:false
- type:textarea
attributes:
label:Log(s) & preferences file(s)
description:|
Add these files:qBittorrent preferences file, qBittorrent.log & watched_folders.json (if using "Watched Folders" feature).
See **[Where does qBittorrent save its settings?](https://github.com/qbittorrent/qBittorrent/wiki/Frequently-Asked-Questions#Where_does_qBittorrent_save_its_settings)**
#### Note: It's the user's responsibility to redact any sensitive information
################################## IMPORTANT ##################################
As you read and fulfill each of the following requirements below,
put an "x" between the square brackets to mark each task as done, like so: [x]
-->
- [ ] I have read the **feature request section** in the [contributing guidelines](https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md), so I know how to submit a good feature request with the required information
- [ ] I have verified that the **feature** I am requesting is **not available** in the **[latest version](https://www.qbittorrent.org/download.php)**
- [ ] (optional but recommended) I have verified that the **feature** I am requesting is **not available** in the **[latest CI build](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci.yaml?query=branch%3Amaster+event%3Apush)**
- [ ] I have **checked the [frequent/common issues list](https://github.com/qbittorrent/qBittorrent/projects/2)** and **searched** the issue tracker for similar feature requests (including closed ones) **to avoid posting a duplicate**
- [ ] This request is **not a support request or question**, both of which are better suited for either the [discussions section](https://github.com/qbittorrent/qBittorrent/discussions), [forum](https://qbforums.shiki.hu/), or [subreddit](https://www.reddit.com/r/qBittorrent/). The [wiki](https://github.com/qbittorrent/qBittorrent/wiki) did not contain a suitable solution either
## Description
<!--
################################## IMPORTANT ##################################
Delete each "(type here)" indicator and type your text in their place in the subsections below.
You MUST fill in ALL subsections marked with "(type here)" with the appropriate information.
Please make sure the description is worded well enough to be understood.
Provide a detailed description of the feature and as much context and examples as necessary.
If the feature request has to do with visual elements and the GUI, images/screenshots are always helpful.
For more information consult the Contributing Guidelines at https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md.
Use the Preview tab before posting to make sure your report looks like it is formatted properly.
You don't need to delete these comments, they won't show up in the final post.
description:Suggest a new feature or enhancement for qBittorrent.
labels:["Feature request"]
body:
- type:markdown
attributes:
value:|
#### ADVISORY
"Please post all details in **English**."
#### Prerequisites before submitting a feature request!
- Read the feature request section in the **[contributing guidelines](https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md)**, to know how to submit a good feature request with the required information.
- Verify that the feature being requested is not available in the **[latest official qBittorrent version](https://www.qbittorrent.org/download.php).**
- (Optional but recommended) Verify that the feature being requested is not available in the latest CI (**[macOS](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_macos.yaml?query=branch%3Amaster+event%3Apush)** / **[Ubuntu](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_ubuntu.yaml?query=branch%3Amaster+event%3Apush)** / **[Windows](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_windows.yaml?query=branch%3Amaster+event%3Apush)**) builds.
- Search the issue tracker with the **[feature request filter](https://github.com/qbittorrent/qBittorrent/issues?q=is%3Aopen+is%3Aissue+label%3A%22Feature+request%22)** for similar feature requests (including closed ones) to avoid posting a duplicate.
- Make sure this is not a support request or question, both of which are better suited for either the **[discussions section](https://github.com/qbittorrent/qBittorrent/discussions)**, **[forum](https://qbforums.shiki.hu/)**, or **[subreddit](https://www.reddit.com/r/qBittorrent/)**.
- Verify that the **[wiki](https://github.com/qbittorrent/qBittorrent/wiki)** did not contain a suitable solution either.
- type:textarea
attributes:
label:Suggestion
validations:
required:false
- type:textarea
attributes:
label:Use case
validations:
required:false
- type:textarea
attributes:
label:Extra info/examples/attachments
description:Add screenshots etc. (Anything that will give us more context about what is being requested!)
stale-pr-message:"This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity."
close-pr-message:"This PR was closed because it has been stalled for some time with no activity."
copyright: 'uknown.svg' (LGPLv3+) from Oxygen Icon Theme was used as base which was slightly modified and 'qbittorrent-tray.svg' (GPLv2+) was overlayed above it.
copyright: 'unknown.svg' (LGPLv3+) from Oxygen Icon Theme was used as base which was slightly modified and 'qbittorrent-tray.svg' (GPLv2+) was overlaid above it.
feature_option(VERBOSE_CONFIGURE "Show information about PACKAGES_FOUND and PACKAGES_NOT_FOUND in the configure output (only useful for debugging the CMake build scripts)" OFF)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
feature_option_dependent(DBUS
"Enables support for notifications and power-management features on Linux via D-Bus"
"Enable support for notifications and power-management features via D-Bus"
ON "GUI" OFF
)
feature_option_dependent(SYSTEMD
"Install systemd service file to a directory manually overridable with Systemd_SERVICES_INSTALL_DIR"
OFF "NOT GUI" OFF
)
if (STACKTRACE)
check_cxx_source_compiles(
"#include <execinfo.h>
int main(){return 0;}"
QBITTORRENT_HAS_EXECINFO_H
)
if (NOT QBITTORRENT_HAS_EXECINFO_H)
message(FATAL_ERROR "execinfo.h header file not found.\n"
"Please either disable the STACKTRACE feature or use a libc that has this header file, such as glibc (GNU libc)."
All new code **must** follow the following coding guidelines. \
All new code **must** follow the following coding guidelines.
If you make changes in a file that still uses another coding style, make sure that you follow these guidelines for your changes. \
For programming languages other than C++ (e.g. JavaScript) used in this repository and submodules, unless otherwise specified, coding guidelines listed here applies as much as possible.
@ -275,7 +276,7 @@ struct StructName {};
enum EnumName {};
typedef QList<ClassName> SomeList;
using SomeList = QList<ClassName>;
namespace NamespaceName
{
@ -317,7 +318,7 @@ The headers should be ordered alphabetically within each group. \
If there are conditionals for the same header group, then put them at the bottom of the respective group. \
If there are conditionals that contain headers from several different header groups, then put them above the "qBittorrent's own headers" group.
One exception is the header containing the library version (for example, QtGlobal), this particular header isn't constrained by the aforementioned order.
One exception is the header containing the library version (for example, QtVersionChecks), this particular header isn't constrained by the aforementioned order.
Example:
@ -330,7 +331,7 @@ Example:
// exceptions, headers containing version number
#include<boost/version.hpp>
#include<libtorrent/version.hpp>
#include<QtGlobal>
#include<QtVersionChecks>
// C++ Standard Library headers
#include<cstdio>
@ -341,7 +342,7 @@ Example:
// System headers
#ifdef Q_OS_WIN
#include<Windows.h>
#include<windows.h>
#endif
// Boost library headers
@ -456,8 +457,8 @@ class ExampleWidget : public QWidget
* [Before submitting an enhancement/feature request](#before-submitting-an-enhancementfeature-request)
* [Steps to ensure a good enhancement/feature suggestion](#steps-to-ensure-a-good-enhancementfeature-suggestion)
* **[Opening a pull request](#opening-a-pull-request)**
* [Must read](#must-read)
* [Good to know](#good-to-know)
# Bug reporting etiquette
@ -31,7 +23,7 @@ Read the respective section to find out more.
* **Be patient.** The development team is small and resource limited. Developers and contributors take from their free time to analyze the problem and fix the issue. :clock3:
* Harsh words or threats won't help your situation. What's worse, your complain will (very likely) be **ignored.** :fearful:
* Harsh words or threats won't help your situation. Your complaint will (very likely) be **ignored.** :fearful:
# Submitting an issue/bug report
@ -47,7 +39,7 @@ Developers and contributors are not supposed to deal with issues for which littl
Positive contributions are those which are reported with efforts to find the actual cause of an issue, or at the very least efforts were made to narrow it as much as possible.
Requiring people to investigate as much as possible before opening an issue will more than likely avoid burdening the project with invalid issues or issues unrelated to qBittorrent.
Requiring people to investigate as much as possible before opening an issue avoids burdening the project with invalid issues or issues unrelated to qBittorrent.
The following are _not_ bug reports. **Check the [wiki][wiki-url], [forum][forum-url] or other places for help and support for issues like these**:
@ -194,28 +186,26 @@ Following these guidelines helps maintainers and the community understand your s
# Opening a pull request
### Must read
* Read our [**coding guidelines**][coding-guidelines-url]. There are some scripts to help you: [uncrustify script][uncrustify-script-url], [astyle script][astyle-script-url], [(related thread)][coding-guidelines-thread-url].
* Keep the title **short** and provide a **clear** description about what your pull request does.
* Provide **screenshots** for UI related changes.
* Keep your git commit history **clean** and **precise.** Refer to the section about "Git commit messages" in the [**coding guidelines**][coding-guidelines-url].
* If your commit fixes a reported issue (for example #4134), add the following message to the commit `Closes #4134.`. Example [here][commit-message-fix-issue-example-url].
* Consult [coding guidelines][coding-guidelines-url] first. If you are working on translation/i18n, read ["How to translate qBittorrent"][how-to-translate-url].
* Keep your git commit history clean.
* Refer to the section about ["Git commit messages"][coding-guidelines-git-commit-message-url] in the coding guidelines.
* When merge conflicts arise, do `git rebase <target_branch_name>` and fix the conflicts, don't do `git pull`. Here is a good explanation: [merging-vs-rebasing][merging-vs-rebasing-url].
* Keep pull request title concise and provide motivation and "what it does" in the pull request description area. Make it easy to read and understand.
* Provide screenshots for UI related changes.
* If your commit addresses a reported issue (for example issue #8454), append the following text to the commit body `Closes #8454.`. Example [commit][commit-message-fix-issue-example-url].
* Search [pull request list][pull-request-list-url] first. Others might have already implemented your idea (or got rejected already).
### Good to know
* **Search** pull request history! Others might have already implemented your idea and it is waiting to be merged (or got rejected already). Save your precious time by doing a search first.
* When resolving merge conflicts, do `git rebase <target_branch_name>`, don't do `git pull`. Then you can start fixing the conflicts. Here is a good explanation: [link][merging-vs-rebasing-url].
- WEBUI: Fix empty selection in language combobox (Chocobo1)
- WEBUI: Store WebUI port setting in human readable number (Chocobo1)
- WEBUI: Add support for exporting .torrent (Tom Piccirello)
- WEBUI: WebAPI: Add endpoint to set speed limit mode (glassez)
- WEBUI: Improve progress bar rendering (Mike Lei)
- WEBUI: Add transfer list refresh interval settings (summer)
- WEBUI: Use natural sort (Chocobo1)
- WEBUI: Apply i18n translation only to built-in WebUI (Chocobo1)
- WEBUI: Alert when HTTPS settings are incomplete (Chocobo1)
- WEBUI: Handle drag and drop events (Chocobo1)
- WEBUI: Fix wrong behavior for shutdown action (Chocobo1)
- WEBUI: Don't disable combobox for file priority (Chocobo1)
- RSS: Increase limit of maximum number of articles per feed (summer)
- WINDOWS: Fix `Open destination folder` delay on Windows (Andrew)
- WINDOWS: NSIS: Update Russian, Estonian, Japanese, Dutch, Portuguese BR, German and Indonesian translations (Andrei Stepanov, Priit Uring, maboroshin, Thomas De Rocker, Ícaro, schnurlos, Faisal A. F. Rahman)
- LINUX: Mark as single window app in .desktop file (Nicolas Fella)
- LINUX: Add Dockerfile (Amanuense-del-diavolo, Tom Piccirello, Chocobo1)
- LINUX: Remove option of using icons from system theme (now-im)
- MACOS: Fix wrong background color in properties widget (NotTsunami)
- OTHER: Binary distributions of qbittorrent are GPLv3+ licensed (sledgehammer999)
Tue Aug 30 2022 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.4.5
[](https://github.com/qbittorrent/qBittorrent/actions)
[](https://github.com/qbittorrent/qBittorrent/actions)
@ -16,15 +15,8 @@ support as well as many features.
The free [IP to Country Lite database](https://db-ip.com/db/download/ip-to-country-lite) by [DB-IP](https://db-ip.com/) is used for resolving the countries of peers. The database is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).
### Installation:
For installation, follow the instructions from INSTALL file, but simple:
```
./configure
make && make install
qbittorrent
```
will install and execute qBittorrent hopefully without any problem.
Refer to the [INSTALL](INSTALL) file.
### Public key:
Starting from v3.3.4 all source tarballs and binaries are signed.<br/>
@ -37,16 +29,16 @@ For more information please visit:
https://www.qbittorrent.org
or our wiki here:
http://wiki.qbittorrent.org
https://wiki.qbittorrent.org
Use the forum for troubleshooting before reporting bugs:
http://forum.qbittorrent.org
https://forum.qbittorrent.org
Please report any bug (or feature request) to:
http://bugs.qbittorrent.org
https://bugs.qbittorrent.org
Official IRC channel:
`#qbittorrent on irc.libera.chat`
[#qbittorrent on irc.libera.chat](ircs://irc.libera.chat:6697/qbittorrent)
qBittorrent takes the security of our software seriously, including all source code repositories managed through our GitHub organisation.
If you believe you have found a security vulnerability in qBittorrent, please report it to us as described below.
## Reporting Security Issues
Please do not report security vulnerabilities through public GitHub issues. Instead, please use GitHubs private vulnerability reporting functionality associated to this repository. Additionally, you may email us with all security-related inquiries and notifications at `security@qbittorrent.org`.
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
1. Type of issue
2. Step-by-step instructions to reproduce the issue
3. Proof-of-concept or exploit code (if possible)
4. Potential impact of the issue, including how an attacker might exploit the issue
This information will help us triage your report more quickly. Any and all CVEs will be requested and issued through GitHubs private vulnerability reporting functionality, which will be published alongside the disclosure.
This security policy only applies to the most recent stable branch of qBittorrent. Flaws in old versions that are not present in the current stable branch will not be fixed.
* `torrents/trackers` returns three new fields: `next_announce`, `min_announce` and `endpoints`
* `endpoints` is an array of tracker endpoints, each with `name`, `updating`, `status`, `msg`, `bt_version`, `num_peers`, `num_peers`, `num_leeches`, `num_downloaded`, `next_announce` and `min_announce` fields
* `torrents/trackers` now returns `5` and `6` in `status` field as possible values
* `5` for `Tracker error` and `6` for `Unreachable`
# Check if already in >= C++17 mode because of the flags returned by one of the above packages
TMP_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=""
AC_MSG_CHECKING([if compiler defaults to C++17 or later mode])
AC_COMPILE_IFELSE([DETECT_CPP17_PROGRAM()],
[AC_MSG_RESULT([yes])
QBT_CXX17_FOUND="yes"],
[AC_MSG_RESULT([no])
QBT_CXX17_FOUND="no"])
# In case of no, check if the compiler can support at least C++17
# and if yes, enable it leaving a warning to the user
AS_IF([test "x$QBT_CXX17_FOUND" = "xno"],
[AC_MSG_CHECKING([if compiler supports C++17])
CXXFLAGS="-std=c++17"
AC_COMPILE_IFELSE([DETECT_CPP17_PROGRAM()],
[AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if C++17 is disabled by the set compiler flags])
# prepend the flag so it won't override conflicting user defined flags
CXXFLAGS="-std=c++17 $TMP_CXXFLAGS"
AC_COMPILE_IFELSE([DETECT_CPP17_PROGRAM()],
[AC_MSG_RESULT([no])
QBT_ADD_CONFIG="$QBT_ADD_CONFIG c++17"
AC_MSG_WARN([C++17 mode is now force enabled. The C++ mode should match the mode that other libraries were built with, otherwise you'll likely get linking errors.])],
[AC_MSG_RESULT([yes])
AC_MSG_ERROR([The compiler supports C++17 but the user or a dependency has explicitly enabled a lower mode.])])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([A compiler supporting C++17 is required.])])
])
CXXFLAGS="$TMP_CXXFLAGS"
# These are required because autoconf doesn't expand these **particular**
# vars automatically. And qmake cannot autoexpand them.
AX_DEFINE_DIR([EXPAND_PREFIX], [prefix])
AX_DEFINE_DIR([EXPAND_BINDIR], [bindir])
AX_DEFINE_DIR([EXPAND_DATADIR], [datadir])
AX_DEFINE_DIR([EXPAND_MANDIR], [mandir])
# Original extract() function contributed by pmzqla
# $*: Strings to parse
# Set $QBT_CONF_DEFINES, $QBT_CONF_INCLUDES, $QBT_CONF_EXTRA_CFLAGS
extract() {
if [[ -z "$*" ]]; then
echo "Input string required"
return 1
fi
# BSD sed needs an actual newline character in the substitute command
new_line='
'
# Convert " -" to "\n" if not between quotes and remove possible leading white spaces