1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-07 09:52:18 +02:00

Compare commits

...

316 Commits

Author SHA1 Message Date
tehcneko
d5c173be16 WebUI: Fix path input layout in torrent creator
PR #23345.
2025-10-07 02:35:47 +08:00
Chocobo1
e78b392c7b Avoid spawning another temporary event loop
And redirect stderr messages to console.

PR #23344.
2025-10-07 02:27:19 +08:00
Chocobo1
34ad55bb29 Avoid duplicate lookup
In C++20 `std::views::transform()` followed by `std::views::filter()` has a nasty effect of
invoking transformation function twice.
Note that there will be a `std::views::cache_latest()` in C++26 to
address this issue.

Ref:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2760r1.html#cache_last
https://stackoverflow.com/questions/64199664/why-c-ranges-transform-filter-calls-transform-twice-for-values-that-match

PR #23343.
2025-10-07 02:12:27 +08:00
Chocobo1
d5d690cace Utilize algorithms from std::ranges
The result is shorter code and improves readability.
Note that `asConst()` is still required for non-const containers, otherwise the container will
detach.

PR #23342.
2025-10-07 01:56:08 +08:00
dependabot[bot]
4181a10542 GHA CI: Bump Github Actions versions
PR #23332.

---

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-05 18:30:51 +08:00
Samuel Lachance
ee881d4889 Allow to filter RSS by simple string
Adds a search bar for RSS items. It supports plain text search (no regex), applies only to the selected tab, updates results as you type, and shows all items when the field is empty.

PR #23278.
Resolves #14719, resolves #15538, resolves #18444, resolves #18183, resolves #22570.

---------

Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
2025-10-04 08:12:26 +08:00
Chocobo1
eed0e56d1a Use proper return type
`count()`, `length()`, `size()`, `indexOf()` and `lastIndexOf()` were
returning `int` in Qt5. In Qt6 they return `qsizetype`.

PR #23317.
2025-09-29 03:08:02 +08:00
Chocobo1
01ac8c012c Improve parsing HTTP request line
Now the parsing is done with Views and the conversion to `QString` is
only done in the last step.

PR #23316.
2025-09-29 02:56:09 +08:00
cocopaw
2d6d9ab792 Add Torrent Creator toolbar button
PR #23305.
Closes #21489.
2025-09-29 02:36:30 +08:00
Tom Piccirello
4fb54d3da0 WebUI: fix adding torrent when using virtual tables
When using virtual tables we can't rely on fetching the values from the DOM. We should always fetch values directly from the file tree.

PR #23263.
Closes #23241.
2025-09-29 02:19:07 +08:00
Vladimir Golovnev
84224c1bbf Don't fail because of existing files when exporting torrent files
PR #23315.
Closes #23017.
2025-09-28 21:08:00 +03:00
nn
42786b2afc Restore default drag behavior in Torrent Content widget
Multi-selection for default LMB action, as before 5.1 update.
Adds option to select grab as the default behavior, for users who don't have the Alt key available.
Holding the Alt key toggles between grab/multi-selection.

PR #23180.
Closes #22686.
2025-09-29 01:58:46 +08:00
Vladimir Golovnev
222d265eec Log a critical error before aborting the app
PR #23303.
2025-09-27 20:22:38 +03:00
Chocobo1
d02b01c733 WebUI: don't send HTTP Referer header to other servers
`same-origin`
> Sends the full URL (stripped of parameters) for same-origin requests. Cross-origin requests will contain no referrer header.

This would be helpful for 3rd party WebUI that were forked from the
official one. The official WebUI is not affect by this change since the
request is blocked by CSP.

PR #23294.
2025-09-27 15:54:49 +08:00
Chocobo1
10b879bdaf Propagate error messages from search engine
This will be useful for development and debugging issues. The messages will be outputted to both console and qbt logger.
Note that having stderr messages does not always mean the operation failed but there might be some (non-fatal) issues.

PR #23293.
Closes #6553. Closes #22381. Closes #23052.
2025-09-27 15:42:51 +08:00
Vladimir Golovnev
3de2a9f486 Don't create lock file in internal data folders
PR #23279.
2025-09-22 20:09:21 +03:00
Tom Piccirello
3b744c3dba WebUI: fix lint errors
PR #23277.
2025-09-22 10:35:21 +08:00
cocopaw
9696c99dbd Block invalid file names when renaming torrent content
Relevant issues: #22426, #21899,#16906,#16834, #16271, #11276, #9085, #11340, #14728, #20412, #20337, #17049, #17752, #17469, #15378, #15227, #14908.
PR #23060.

---------

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
2025-09-20 14:42:30 +08:00
Tom Piccirello
753fb80e9b WebAPI: Append port to session cookie name
PR #23228.
Closes #21651.
2025-09-19 08:29:46 +03:00
Chocobo1
c075097acd Allow to run CI checks locally
Now the developer is able to run the checks easily and locally (by
following the instructions in nova3/README.md).

PR #23262.
2025-09-14 22:17:23 +08:00
Chocobo1
b0148ef36c WebUI: enforce coding style
* WebUI: prefer `classList.toggle()` over other pattern
  Addresses: https://github.com/qbittorrent/qBittorrent/pull/23231#discussion_r2328647152
* WebUI: prefer using built-in objects Constructor
* WebUI: combine function calls

PR #23261.
2025-09-14 22:11:23 +08:00
Mark Yu
5edaf2cf10 Use class instead of struct
PR #23255.
2025-09-14 17:18:44 +08:00
Mark Yu
fcaa95101d Allow equals character in the command line value
The CLI options should allow the `=` (equals) char as value so doing `--save-path="/home/test/mydir = somedir"` should parse properly with the `value` method returning `"/home/test/mydir = somedir"`.

Closes #23248.
PR #23251.

---------

Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
2025-09-14 16:54:14 +08:00
Mark Yu
8e14541236 Allow to copy content paths of selected torrents
Closes #23227.
PR #23239.

---------

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
2025-09-14 16:42:59 +08:00
xavier2k6
919520b4c3 GHA CI: Install NSIS via third party action on Windows
* Install `NSIS` via https://github.com/repolevedavaj/install-nsis
* `NSIS` is no longer installed on GitHub provided Runner Image as of `windows-2025`
* `NSIS: 3.10` was only available on `windows-2019 / windows-2022`
* We can use newer release now eg. `NSIS: 3.11`.

PR #23249.
2025-09-14 16:33:24 +08:00
Thomas (Tom) Piccirello
df9e2bb155 Run all WebUI CI checks regardless of failure
This fixes an annoyance I've hit with the WebUI CI checks. If the linter fails, the GH Action immediately exits before the formatter has run. This can mean fixing the lint error and pushing up a change, only for the GH Action to then fail due to the formatter check.
This PR makes it so that all checks always run, with the job still failing if any of the checks failed. It should allow for a quicker feedback loop. For an example, see #23199
GitHub Action docs: https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#steps-context

PR #23198.
2025-09-13 01:53:10 +08:00
Thomas (Tom) Piccirello
7ddbf58a3b WebAPI: Respond with more detailed info
* WebAPI: return error message when endpoint not found
* WebAPI: send appropriate status code when logging in
* WebAPI: return more info when adding torrents

PR #23202.
Closes #375.
Closes #10688.
Closes #10747.
Closes #11464.
2025-09-12 17:53:48 +03:00
Thomas (Tom) Piccirello
69b2d7a53e WebAPI: Support persisting WebUI client preferences
This provides a mechanism for persisting WebUI client preferences that are distinct from the broader qBittorrent preferences. These preferences apply exclusively to the WebUI.

PR #23088.
2025-09-12 17:47:32 +03:00
Chocobo1
94ef038f3a Improve abstraction of search plugin
To make intentions clear and avoid misuse.
Now it should be possible to inherit `Engine` class and create an usable subclass from it.

PR #23232.
2025-09-07 17:50:39 +08:00
Chocobo1
5c0010ac6c WebUI: prefer for loop over Array.forEach method
These were missed in 6ac0c5a8b8.
Also refactor the code a bit.

PR #23231.
2025-09-07 16:16:31 +08:00
Chocobo1
0a9316382a WebUI: fix invalid method
The FileList type has no `entries()` method. Use the generic function from `Array` instead.
Addresses https://github.com/qbittorrent/qBittorrent/pull/23182#discussion_r2319408410

Closes #23224.
2025-09-07 16:14:40 +08:00
dependabot[bot]
463ac253fd GHA CI: Bump actions version
PR #23208.

---
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-07 16:11:02 +08:00
Thomas (Tom) Piccirello
4ad93bafb2 Update Piccirello's copyright email
PR #23197.
2025-09-07 16:10:07 +08:00
Thomas (Tom) Piccirello
f651a311a4 WebUI: Fix add torrent spinner in Firefox
Firefox seems to have an issue where svgs loaded via background-url are not animated. Loading the svg directly as an img fixes this.

Related: #23074.
PR #23195.
2025-09-07 16:02:32 +08:00
Userdocs
3146a3c2f9 Fix compilation in C++23 mode
This adds c++23 support. In my testing it works for nox and desktop.

PR #23193.
2025-09-07 15:49:50 +08:00
Thomas (Tom) Piccirello
93a72673d4 WebAPI: send names of missing required params
Small quality of life improvement.

PR #23192.
2025-09-05 20:46:47 +08:00
anikey
56277d5e2b WebUI: add I2P peers to peer list
The WebUI part of the changes for #23061. Now qBittorrent will display I2P peers in WebUI peers tab.
Fixes the second part of #19794 ("i2p peer list does not show in GUI").

PR #23185.
2025-09-05 20:40:25 +08:00
Thomas (Tom) Piccirello
ac31fe52e9 WebUI: Continue polling after network error
These `fetch` calls properly handle 4xx and 5xx errors, but don't handle network errors. In all cases, I've used the same logic as the `!response.ok` branch of each individual fetch function. This should ensure consistent behavior.

PR #23164.
2025-09-05 20:32:43 +08:00
Thomas (Tom) Piccirello
4fa433a728 WebUI/WebAPI: Support downloading torrent via search plugin
This adds support for downloading a torrent via a search plugin's `download_torrent` function. This primarily affects torrents that use a private tracker requiring a login.

Closes #18334.
PR #23163.
2025-09-05 20:24:15 +08:00
Chocobo1
becfd19e34 Enable full type checking on search engine
Now it utilize type stub for PySocks library and all search engine python code are properly
type checked.

Note that a `cast` is required because there isn't enough hints in PySocks to let the type
checker understand that the classes are supposed to be compatible.

PR #23183.
2025-08-31 22:10:30 +08:00
Chocobo1
dffd27a879 WebUI: prefer range based for loop
Using `entries()` can also save the work of manually handling the index variable.

PR #23182.
2025-08-31 21:54:48 +08:00
Chocobo1
b851caa6b9 WebUI: use local preference class locally 2025-08-31 21:45:48 +08:00
Chocobo1
07f2afc4ac WebUI: move variable into proper scope 2025-08-31 21:45:48 +08:00
Thomas (Tom) Piccirello
02c2a68282 WebAPI: Remove outdated TODO
This TODO has been in the code for 8 years since it was added in #6475 (commit b271fa9f00). It appears to have been related to the `skipChecking` variable, though what it actually means has been lost over time. Note that both the `savePath` and the `downloadPath` are recursively created if they don't yet exist.

PR #23165.
2025-08-31 21:31:49 +08:00
Chocobo1
0933ffd805 GHA CI: use preinstalled packages on macOS
This is to address the following error:
https://github.com/qbittorrent/qBittorrent/actions/runs/17323566048/job/49182687551?pr=23182#step:4:745
> Error: cmake was installed from the local/pinned tap
> but you are trying to install it from the homebrew/core tap.
> Formulae with the same name from different taps cannot be installed at the same time.

PR #23184.
2025-08-31 21:15:13 +08:00
Dru Still
8daa87d9de Add status bar menu with DL/UL display on macOS
Implements a native macOS status bar item that displays the qBittorrent icon and provides a minimal menu showing live download and upload rates. This allows quick network activity checks without switching to the app window or relying on the Dock.

Closes #22545.
PR #23098.
2025-08-31 21:06:42 +08:00
anikey
5e11f4dc5e WebAPI: Add I2P peers to peer list
Fixes the second part of #19794.

PR #23061.
2025-08-29 20:51:31 +08:00
Chocobo1
6ac0c5a8b8 WebUI: prefer for loop over Array.forEach method
The `for` loop can do everything `forEach` can and doesn't need a closure.
2025-08-27 22:19:16 +08:00
Chocobo1
2be052e9c4 WebUI: enforce sorted imports
Due to `allowSeparatedGroups = true`, the sorting is applied on a group of consecutive imports.
That means a new group of imports can be created by adding a blank line.
2025-08-27 22:19:16 +08:00
Chocobo1
2bd0965906 WebUI: remove redundant braces in switch statements
Braces are only required when there are variable/function declarations.
2025-08-27 22:19:16 +08:00
Chocobo1
acab056fe4 WebUI: disallow number literals with zero fractions or dangling dots
Javascript treats them all the same as `Number`.
2025-08-27 22:19:16 +08:00
Chocobo1
86acc01b1a WebUI: prefer Number static properties over global ones
`Number` purpose is modularization of globals in ECMAScript 2015.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseInt#number.parseint_vs._parseint
2025-08-27 22:19:16 +08:00
tehcneko
fb4b266828 WebUI: Fix blurry window controls
PR #23131.
2025-08-26 17:09:01 +08:00
Thomas (Tom) Piccirello
c953730a42 WebUI: Various improvements to dynamic tables
This PR contains various small improvements to dynamic tables, mostly around reducing duplication.

Closes #22921.
PR #23081.
2025-08-26 17:01:30 +08:00
Chocobo1
4be33b2ddc Fix typo
This typo is causing the header `X-Forwarded-Proto` to be ineffective
(when using reverse proxy).

PR #23120.
2025-08-23 03:21:28 +08:00
Thomas (Tom) Piccirello
6830e32c72 WebUI: replace callback with promise chaining
PR #23109.
2025-08-23 03:14:49 +08:00
Thomas (Tom) Piccirello
2f34c9b2f0 WebAPI: Omit file names in parseMetadata response
This allows us to bypass any issues related to non-ascii file names.
Supersedes #23080.

PR #23085.
2025-08-23 03:06:24 +08:00
Hanabishi
bda37cbade Improve parsing of HTTP headers
Parse HTTP headers using raw byte arrays instead of strings. This allows us to apply different encodings for different parts.
This change is backward compatible and should not affect any existing operation, so WebAPI version bump is not required.

PR #23083.
2025-08-23 02:51:51 +08:00
Chocobo1
feacfb0627 WebUI: enforce using prefix operators via ESLint
NPM has a bug that cannot fetch the plugin via git protocol:
https://github.com/npm/cli/issues/2610, so fetch a tarball instead.

PR #23110.
2025-08-18 03:05:25 +08:00
xavier2k6
119a5a6e85 GHA CI: Bump some pre-commit hook revisions
* Bumped `pre-commit-hooks` -> v6.0.0
* Bumped `typos` -> v1.35.3

PR #23097.
2025-08-18 02:58:38 +08:00
Thomas Piccirello
6ef9db89f9 WebUI: Support editing tracker tier
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.
2025-08-18 02:46:10 +08:00
tehcneko
b2d6323034 Replace RSS articles icons with SVG
Closes #22335.
PR #23082.
2025-08-15 18:15:33 +08:00
Chocobo1
7a1a214f73 WebUI: prefer prefix increment operator
Adhere to coding style.

PR #23076.
2025-08-12 19:02:59 +08:00
Chocobo1
d6672abb94 WebUI: use static method for getting time
Unify API usage across the code base.

PR #23077.
2025-08-11 16:47:37 +08:00
tehcneko
03fb036ae3 WebUI: Replace GIFs with SVG
Unused GIFs have been removed along with their CSS; some GIFs have been replaced with CSS, and all SVGs were drawn myself.

PR #23074.
2025-08-11 16:38:11 +08:00
tehcneko
f743ae2d08 WebUI: Use native css transition for context menu
Reduce MooTools usage.

PR #23069.
2025-08-11 16:28:47 +08:00
tehcneko
a265ba7fd2 WebUI: Implement missing tracker list features
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.
2025-08-11 16:20:58 +08:00
Vladimir Golovnev
2631692cff Improve changing torrents queue positions
PR #23068.
2025-08-10 18:37:19 +03:00
Thomas Piccirello
02892d1250 WebUI: Add new Add Torrent experience
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.
2025-08-09 18:34:38 +08:00
Ryu481
02d72179fe Migrate away from deprecated methods for setting the standard application on macOS
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.
2025-08-09 18:13:18 +08:00
Ryu481
fa3531dcb4 GHA CI: Disable the hardened runtime in the codesigning workflow for macOS
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.
2025-08-09 17:59:18 +08:00
Vladimir Golovnev
de7d9c960d Forbid usage of context-less connections
PR #23032.
2025-08-06 16:28:31 +03:00
rekayno
4eda3e791a Fix invalid Transifex links
PR #23057.
2025-08-05 00:20:53 +08:00
Thomas Piccirello
e86cc22b3d WebUI: Fix editing/creating category
This broke in #22938.

Closes #23042.
PR #23056.
2025-08-04 18:29:33 +08:00
tehcneko
96c55c4998 WebUI: Make "column resize" strings translatable
PR #23053.
2025-08-04 18:14:55 +08:00
HamletDuFromage
d7b330c069 WebAPI: Add setComment endpoint
No UI implementation as of now.

Closes #19598.
PR #23031.
2025-08-04 17:52:54 +08:00
Chocobo1
fef6ac515c Use source URL for search plugins
This saves a few URL redirections. And avoids potential issues related to Cloudflare
protections/blockages on qbt domain.

Closes #22990.
PR #23048.
2025-08-03 15:16:57 +08:00
Chocobo1
94552b2384 WebUI: use secure random number generator for generating random port
Cryptographically strong random number generators are generally preferred over others.

PR #23049.
2025-08-03 15:09:39 +08:00
Ryu481
ae8a6689dc Migrate away from deprecated API on MacOS
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.
2025-08-01 18:25:56 +08:00
Chocobo1
2c6c61cc79 WebUI: migrate away from outdated config in ESLint
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.
2025-07-28 04:33:50 +08:00
Chocobo1
eb84e99866 Revise command-line show message condition
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.
2025-07-28 04:26:39 +08:00
Chocobo1
378b8c78cb GHA CI: fix broken retry when packaging for macOS
Failed CI instance: https://github.com/qbittorrent/qBittorrent/actions/runs/16437290836/job/46449723244
Follow up bb1c02125b.

PR #23036.
2025-07-28 04:20:30 +08:00
Thomas Piccirello
2b3ee59e25 WebUI: Fix broken CACHEID changes
This broke in #22945.

PR #23025.
2025-07-28 04:09:21 +08:00
Illustar0
bb1c02125b GHA CI: Add code signing to fix app launch crash on macOS
PR #23016.
2025-07-22 15:09:16 +08:00
Chocobo1
d4c914e003 Add alternative URL for program update checking
The alternative URL is hosted on GitHub and users are able to access it:
https://github.com/qbittorrent/qBittorrent/issues/23000#issuecomment-3092538814
https://github.com/qbittorrent/qBittorrent/issues/23009#issuecomment-3093201180

Also, disguise the user agent as a normal browser to avoid standing out from the crowd and
avoid whatever issues from CDN. This only applies to non-fosshub URLs.

Closes #23000.
Closes #23009.
PR #23014.
2025-07-22 14:56:42 +08:00
Ryu481
03efbac581 Migrate away from deprecated iconForFileType
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.
2025-07-21 01:47:26 +08:00
Thomas Piccirello
1c33fefc6d Fix wrong PR linked in WebAPI changelog
Follow up to #22958.
PR #22994.
2025-07-20 16:47:01 +08:00
Mark Yu
8f709b5fbc WebUI: Implement Share limit action
PR #22989.
Closes #22984.
2025-07-20 16:39:31 +08:00
Thomas Piccirello
c962a6b1d7 WebUI: Apply cache id to all loaded resources
This includes html files and js/css assets loaded via MooTools.

PR #22945.
Closes #18712.
2025-07-20 16:32:18 +08:00
Bark
e3141ce449 WebUI: Allow closing dialogs with Escape key
Tested on the following WebUI Modals:
1. Delete
2. Rename files
3. Settings
4. About
5. Statistics
6. Add torrent

PR #22920.
Closes #13891.
2025-07-20 16:23:22 +08:00
Thomas Piccirello
163f683186 WebUI: Support reannouncing individual trackers
PR #22954.
2025-07-19 15:29:14 +08:00
Chocobo1
7c443b0c3b Fix random function detection with static PIE builds
Certain build options didn't like the detection with an no-op. So make it really fetch a random value.

Closes #22981.
PR #22987.
2025-07-15 01:56:04 +08:00
Ryu481
ec9d541bbd Don't leave an empty folder when deleting or moving torrents
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.
2025-07-15 01:44:57 +08:00
Thomas Piccirello
7aebd07f9f WebUI: Support managing category download path
PR #22938.
2025-07-15 01:29:03 +08:00
Vladimir Golovnev
e1ebf8374e Add option to disable torrent state colors
PR #22976.
2025-07-14 11:40:53 +03:00
Thomas Piccirello
66f3cf7e67 Reannounce DHT when reannouncing all trackers
PR #22953.
2025-07-13 21:39:29 +08:00
Bark
bf86592e8c WebUI: Add value constraint checks
Closes #22758.
PR #22911.
2025-07-13 21:29:33 +08:00
Vladimir Golovnev
b18a964a0b Add a small gap between progress bars
PR #22977.
2025-07-13 08:45:37 +03:00
Mark Yu
9fc7bd938f Add option to make progress bar to follow torrent state color
PR  #22967.

---------

Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
2025-07-13 08:42:38 +03:00
Ryu481
f5a93be544 Fix system language autodetection on MacOS
PR #22957.
2025-07-08 12:38:02 +03:00
Thomas Piccirello
399707fdc5 WebUI: Focus on filter field using Ctrl+F
This supports the filters on the Transfers, Search, and Execution Log tabs.

Closes #15482.
PR #22946.
2025-07-08 02:01:51 +08:00
Thomas Piccirello
2ebe8595c9 Modify CategoryOptions serialization to JSON
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: cd3fbfbf9b (r2173148696)

PR #22958.
2025-07-07 00:17:57 +08:00
Thomas Piccirello
c5a282a02f WebUI: Fix footer left alignment
Follow up to #22918.
PR #22947.
2025-07-07 00:04:46 +08:00
Thomas Piccirello
0e0b1d0962 WebUI: Limit window sizes to viewport size
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.
2025-07-06 23:58:07 +08:00
Thomas Piccirello
15b8a81f92 WebUI: Improve search page experience on mobile
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.
2025-07-06 23:50:54 +08:00
Thomas Piccirello
f8d44b5073 WebUI: Fix hiding of filters toolbar
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.
2025-07-06 23:45:45 +08:00
Thomas Piccirello
f42dd1b529 WebUI: Support horizontal scrolling of tabs
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.
2025-07-06 23:40:25 +08:00
Thomas Piccirello
b7a43ea118 WebAPI: Cache metadata using TorrentID
`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.
2025-07-04 17:19:14 +08:00
sledgehammer999
4f94eac235 Merge private branch for an RSS security fix
Reported responsibly by Michael Lappas (@lappas-m)
2025-07-02 08:43:15 +03:00
sledgehammer999
a3e6d1a0ad Merge pull request #22944 from sledgehammer999/fallback_update
Add fallback to update mechanism
2025-07-01 12:03:30 +03:00
Vladimir Golovnev
efedbcb407 Allow to customize ProgressBar color
PR #22928.
2025-07-01 10:28:26 +03:00
Chocobo1
55de9b07d2 Add AppStream metadata for qbt-nox
Also trim redundant trailing path separators.
Ref: https://www.freedesktop.org/software/appstream/docs/sect-Metadata-ConsoleApplication.html

PR #22941.
2025-07-01 14:47:14 +08:00
sledgehammer999
9ad4a94940 Store version numbers in the appropriate type 2025-06-30 15:02:58 +03:00
sledgehammer999
c47b981a56 Add fallback to update mechanism
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.
2025-06-30 15:02:57 +03:00
Ryu481
5028f68d48 Make qBittorrent quit on MacOS with main window closed
Fixes the reported bug that you couldn't quit qBittorrent when the main window was closed on MacOS.

Closes #22849.
PR #22931.
2025-06-30 01:56:39 +08:00
Thomas Piccirello
ef4957a9f4 WebUI: Make footer scrollable on mobile
The window footer can now be scrolled.

Closes #21541.
PR #22918.
2025-06-30 01:51:06 +08:00
Chocobo1
99d25eec71 Use proper capitalization for MSVC linker flags
The linker flags are case insensitive [1] but it would be better to use the proper capitalization [2].

[1] https://learn.microsoft.com/en-us/cpp/build/reference/linking?view=msvc-170#command-line
[2] https://learn.microsoft.com/en-us/cpp/build/reference/guard-enable-guard-checks?view=msvc-170

PR #22940.
2025-06-30 01:45:10 +08:00
Chocobo1
70a6153b78 WebAPI: Trim leading whitespaces on Run External Program fields
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.
2025-06-30 01:39:03 +08:00
Bark
690a139538 WebUI: Add ability to add/remove tracker from selected torrents
Closes #22618.
PR #22698.
2025-06-28 14:06:03 +08:00
Vladimir Golovnev
e447baa04a Allow to customize PiecesBar colors
PR #22922.
2025-06-28 08:53:47 +03:00
Vladimir Golovnev (Glassez)
fdfdbae30c Show warning message box on opening inappropriate URL 2025-06-27 20:59:50 +03:00
Vladimir Golovnev
dd4a2eb583 Don't expose palette colors in UI theme editor
PR #22923.
Fixes regression introduced by #22330.
2025-06-27 13:44:10 +03:00
Vladimir Golovnev
41d7d672ce Optimize parsing of search results
PR #22906.
2025-06-26 08:49:58 +03:00
Vladimir Golovnev (Glassez)
d379fa3035 Prevent opening local files if web page is expected 2025-06-23 13:14:37 +03:00
Vladimir Golovnev
71af105a89 Avoid copying resume data when loading torrents
PR #22899.
2025-06-23 12:20:01 +03:00
Chocobo1
f6ee6b92a4 Revise label wordings
Such that action subject is truly unambiguous to the user.

PR #22894.
2025-06-22 16:01:00 +08:00
Chocobo1
fe1679d778 Provide testing cases for path concatenation
PR #22893.
2025-06-22 15:40:14 +08:00
Thomas Piccirello
67ef356064 WebUI: Delete correct rows after re-sort
The previous logic assumed that trs was properly sorted, which is no longer the case.
Follow up to #22827.

PR #22884.
2025-06-22 15:35:07 +08:00
Thomas Piccirello
254f39f89d WebUI: Restore node default collapse state
By default, nodes should be expanded until explicitly collapsed. This restores the default behavior which changed in b4a16f6464.

Relevant: https://github.com/qbittorrent/qBittorrent/pull/21645#discussion_r2150695297

PR #22879.
2025-06-22 14:55:37 +08:00
tehcneko
d702a02c1f WebUI: Avoid forced reflow on virtual list rerender
Avoid forced synchronous layout caused by offsetHeight/scrollTop access.

PR #22858.
2025-06-22 14:27:16 +08:00
xavier2k6
86e11d344f GHA CI: Bump pandoc to latest
* Bump `pandoc` to latest (3.7.0.2)
* Apply upstream suggestions

PR #22708.
2025-06-22 14:21:50 +08:00
Awqre
6972962ee0 Compress images losslessly
Lossless reduction of file size for .icns icons for MacOS, and some small improvements for a few PNG images.

PR #22790.
2025-06-21 01:21:01 +08:00
Vladimir Golovnev
599a2d0c93 Find CorePrivate package with Qt >= 6.10
PR #22890.
Closes #22887.
2025-06-20 10:20:13 +03:00
Vladimir Golovnev
e27cbab7ee Don't ignore QFile::open() result
PR #22889.
Closes #22888.
2025-06-20 10:19:16 +03:00
Vladimir Golovnev
794310dca9 Add WebAPI for fetching torrent metadata
PR #21015.
2025-06-17 10:15:21 +03:00
Chocobo1
3cd40cc5a2 Merge pull request #22867 from Chocobo1/webui_defer
* WebUI: use defer when loading scripts
  So that the HTML layout can be rendered earlier.
* WebUI: move scripts into <head> section
  For consistency reasons.
2025-06-17 03:03:46 +08:00
Thomas Piccirello
380d9af34c WebUI: Increase number of buffered virtual rows
Negligible performance hit for increased UX. Currently when scrolling I frequently see blank rows.

PR #22853.
2025-06-17 02:53:09 +08:00
Chocobo1
5605e08347 WebUI: move scripts into <head> section
For consistency reasons.
2025-06-16 03:10:37 +08:00
Chocobo1
753c6629a3 WebUI: use defer when loading scripts
So that the HTML layout can be rendered earlier.
2025-06-16 03:10:01 +08:00
xavier2k6
9b66693cb8 GHA CI: Bump dependencies
* Bumped `Qt` to `6.9.1` on macOS/Windows
* Bumped `Qt` to `6.9.1` & `Boost` to `1.88.0` on `coverity-scan`

PR #22839.
2025-06-14 21:17:19 +08:00
Thomas Piccirello
406a389d7c WebUI: Improve performance of re-sorting table rows
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.
2025-06-14 21:06:33 +08:00
Leon Blakey
d7a5430893 Improve resume queue load performance
PR #22831.

---------

Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
2025-06-13 09:47:23 +03:00
Thomas Piccirello
7ac160a481 Bump WebAPI version 2025-06-11 17:03:47 -07:00
Thomas Piccirello
4c190b0d4f Move priority parsing into helper function 2025-06-11 17:03:46 -07:00
Thomas Piccirello
69bf31f4e9 Add WebAPI for downloading torrent metadata
Signed-off-by: Thomas Piccirello <thomas@piccirello.com>
2025-06-11 17:03:46 -07:00
Thomas Piccirello
e45ca3fde7 Support downloading torrent from previously fetched metadata
Signed-off-by: Thomas Piccirello <thomas@piccirello.com>
2025-06-11 17:03:46 -07:00
Thomas Piccirello
5750de6270 Add WebAPI for fetching torrent metadata
Signed-off-by: Thomas Piccirello <thomas@piccirello.com>
2025-06-11 17:03:46 -07:00
Thomas Piccirello
ff07591a87 WebUI: add missing debounce handler
PR #22830.
2025-06-09 21:46:07 +08:00
Chocobo1
c215c1e8b1 WebUI: reduce MooTools usage
WebUI is trying to be less tangled with MooTools.

PR #22822.
2025-06-09 21:39:44 +08:00
Thomas Piccirello
06756936f3 WebUI: Always show Auto Torrent Management option
This behavior is consistent with the GUI.

Closes #22702.
PR #22819.
2025-06-09 21:31:46 +08:00
Thomas Piccirello
7ed026ef78 WebUI: Reset filter selection when double clicking filter
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.
2025-06-09 21:24:58 +08:00
Thomas Piccirello
78fae0ae76 WebUI: Cache server stats for statistics window
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.
2025-06-09 21:17:30 +08:00
Chocobo1
8aa1a96d71 Revise Interface section layout in Options dialog
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.
2025-06-08 17:15:42 +08:00
Chocobo1
4132173b30 WebUI: avoid redundant operations when sorting
Avoid recomputing the same result on every sort operation.
Also clean up the caller site.

PR #22821.
2025-06-08 17:08:47 +08:00
Rémi Marseault
8e2125ee72 WebAPI: Add metadata in /app/getDirectoryContent response
## 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.
2025-06-07 23:02:48 +08:00
Vladimir Golovnev
05bcc4e175 Don't limit the size of read "resume data"
PR #22825.
2025-06-07 06:58:48 +03:00
Thomas Piccirello
5dfb51a8d2 WebUI: Add ability to refresh search
WebUI equivalent of #22122. Refreshing maintains all existing filters.

PR #22805.
2025-06-06 17:32:47 +08:00
Vladimir Golovnev
526abdf7ce Avoid data copying when prepare resume data
PR #22812.
2025-06-06 08:59:39 +03:00
bolshoytoster
617b1da842 WebUI: Keep client session from expiring when the page is hidden
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.
2025-06-05 18:28:35 +08:00
Thomas Piccirello
c59ac3b970 Make modifying log file perms best effort
qBittorrent is able to write to the log file, so it's ok if the permission change fails.

PR #22800.
2025-06-05 17:32:26 +08:00
Thomas Piccirello
0c48b70e5b Send 204 when WebAPI response contains no data
PR #21349.
2025-06-05 09:25:04 +03:00
Vladimir Golovnev
1cb6173ad1 Fix command line placeholders description
PR #22815.
2025-06-05 09:21:46 +03:00
Vladimir Golovnev
2cbfb91b88 Use modern API to export torrent
PR #22786.
2025-06-03 15:24:52 +03:00
Vladimir Golovnev
0729c9a2f8 Handle libtorrent alerts in SessionImpl only
PR #22798.
2025-06-03 08:18:12 +03:00
Shanary
7982f66fa6 WebAPI: Optionally include files info in torrent list
PR #22750.
Closes #22742.
2025-06-01 12:06:11 +03:00
Chocobo1
50d60b9589 GHA CI: enforce sorted import in Python scripts
This main point is to normalize the sorting of imports in Python scripts.
Currently the default setting from isort is used: https://pycqa.github.io/isort/docs/configuration/custom_sections_and_ordering.html

PR #22793.
2025-05-31 18:01:02 +08:00
Chocobo1
96f0eebc4e WebUI: switch to lightweight clipboard library
The new library [1] will opt to the modern Clipboard API [2] when it is available. It will
fallback to the old method otherwise.
The new library is also smaller and without any bloat.

Note that the line `module.exports` is required to be removed/commented out. This is the only
patch required.

[1] https://github.com/feross/clipboard-copy
[2] https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API

PR #22792.
2025-05-31 17:55:10 +08:00
Chocobo1
4b07597d54 WebUI: migrate away from recursion
PR #22791.
2025-05-31 17:38:05 +08:00
Vladimir Golovnev
a9213627a9 Interpret tracker "updating" status as a separate property
PR #22787.
2025-05-30 08:34:26 +03:00
Vladimir Golovnev
28c1ba869b WebUI: Add support for tracker status filter
PR #22166.
2025-05-30 08:32:46 +03:00
tehcneko
054003970e WebUI: Fix path autofill in set location and new category
Attach `PathAutofill` after `DOMContentLoaded`.
Also removed pathAutofill.js in newfolder.html since it's meant for new RSS folder name.

PR #22773.
2025-05-29 21:57:43 +08:00
ivan
44bb1ac7eb WebUI: Add support for tracker status filter 2025-05-27 17:12:43 +03:00
Vladimir Golovnev (Glassez)
e309b17732 WebAPI: Provide announce stats within "sync" data 2025-05-27 11:28:13 +03:00
Chocobo1
e10fb40a48 NSIS: revise license page
The GPL doesn't need to be agreed with and therefore remove 'I accept agreement' checkbox and
adjust related UI elements.

Closes #22660.
PR #22775.
2025-05-27 14:53:50 +08:00
Zentino
7648a2838d Fix access denial messages
Updated error messages for access denial from (401) to (403) for remote content.
Added (401) status code to authentication error messages.

PR #22774.
2025-05-27 14:47:43 +08:00
Vladimir Golovnev
8cd1a80852 WebAPI: Add more properties to 'torrents/info' result
PR #22753.
2025-05-27 09:37:06 +03:00
tehcneko
c79a9624af WebUI: Remove unnecessary script loading
Removed Mootools script in most iframes, there is no longer any Mootools usage in them.

PR #22772.
2025-05-27 14:33:22 +08:00
Chocobo1
4e9c514c2f WebUI: migrate to JS native class
PR #22770.
2025-05-27 14:28:15 +08:00
tehcneko
84ed24e257 WebUI: Replace slider with native input range
Got rid of Mootools and MochaUI.

PR #22769.
2025-05-27 14:22:13 +08:00
tehcneko
48f7f6fb8c WebUI: Convert 'Progress Bar' class to a custom element
Got rid of Mootools and manual calculation of width.

PR #22768.
2025-05-27 14:16:18 +08:00
Vladimir Golovnev
f47754838b Allow to pass torrent comment to external program
PR #22771.
Closes #13186.
2025-05-26 15:35:51 +03:00
bolshoytoster
a3d1ff0eb2 WebUI: Fix memory leak
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>
2025-05-25 15:41:52 +08:00
Chocobo1
afcfea5b8f Merge pull request #22761 from Chocobo1/rss_fields
Add 'Open link' to RSS article header
2025-05-25 15:12:16 +08:00
Chocobo1
84cd8e1535 Utilize Path class when finding Python executable
This is a code clean up and shouldn't affect the outcome.

PR #22760.
2025-05-25 15:00:19 +08:00
Chocobo1
eb3718fc91 Add 'Open link' to RSS article header 2025-05-23 23:32:46 +08:00
Chocobo1
7e0247fefe Avoid redundant function calls
Fix code formatting.
2025-05-23 23:32:45 +08:00
Chocobo1
f9f031cdb4 Use HTTPS by default 2025-05-23 23:32:39 +08:00
Chocobo1
d56b353c52 Add checks for minimum supported Python version
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.
2025-05-21 14:52:11 +08:00
samet sahin
83799f4f07 WebUI: Prevent mobile keyboards from capitalizing username input
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.
2025-05-18 15:49:40 +08:00
Chocobo1
c7caae1150 WebUI: fix wrong replacement sequence
Only IPv6 addresses may have a 'zone index' and therefore it should be replaced last for the
result to be correct.

PR #22724.
2025-05-18 15:42:36 +08:00
Chocobo1
1662a9deb2 Add fallback for random number generator
`getrandom()` is available since Linux 3.17 (2014/10/05) yet there are older devices that don't
meet this requirement.

Closes #22691.
PR #22723.
2025-05-18 15:37:17 +08:00
Atk
6c310aa311 WebUI: Make multi-rename search & replace fields use a monospace font
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.
2025-05-18 15:32:06 +08:00
xavier2k6
368748ac52 GHA CI: Bump spellcheck related hooks revs
* Bumped `codespell` -> `2.4.1`
* Bumped `typos` -> `1.32.0`

PR #22709.
2025-05-18 15:04:49 +08:00
KanishkaHalder1771
9c81e58de6 Update help message for Windows systems
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.
2025-05-18 14:51:01 +08:00
Chocobo1
778a158597 WebUI: add versioning to local preferences
And provide migration path for changing preferences.

Fixes #22639.
PR #22677.
2025-05-14 07:20:01 +08:00
Chocobo1
09071d2b69 Allow symbolic links in torrent creator on Windows
Note that .lnk files (shortcuts) are always ignored on Windows.

Closes #22665.
PR #22675.
2025-05-14 07:13:52 +08:00
Hanabishi
b79ac0d716 Remove "Physical memory (RAM) usage limit" option on Linux
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.
2025-05-13 00:49:18 +08:00
skomerko
de767871f1 WebUI: Convert 'Pieces Bar' class to a custom element
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.
2025-05-13 00:43:35 +08:00
Chocobo1
2477e13b3f GHA CI: update zizmor rules ID
zizmor 1.7.0 has changed the ID.
https://docs.zizmor.sh/release-notes/#v170

PR #22684.
2025-05-13 00:36:31 +08:00
Chocobo1
eb82c9078d WebUI: always provide event variable
This is unifying coding style and avoid wrong usages.

PR #22676.
2025-05-13 00:11:00 +08:00
Vladimir Golovnev
663da093bd Fix compilation with Qt 6.6.0
PR #22678.
2025-05-12 11:27:02 +03:00
dezza
13f9c20a69 WebUI: Remove unselectable from General tab
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.
2025-05-10 16:48:05 +08:00
justusaac
86e4b662ce WebUI: Select multiple files to rename with Shift
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.
2025-05-10 16:08:19 +08:00
Vladimir Golovnev
dcaf4b6d80 Fix async result handlers
PR #22669.
Closes #22644.
2025-05-10 10:17:35 +03:00
Vladimir Golovnev
d29f47c36e Revamp adding torrents to libtorrent session
PR #22648.
2025-05-08 16:31:02 +03:00
Vladimir Golovnev (Glassez)
ab04064adc Store AddTorrentParams inside alert handlers 2025-05-07 06:52:33 +03:00
Vladimir Golovnev (Glassez)
9afbd47b52 Assign add_torrent_alert handler when adding torrent 2025-05-07 06:52:33 +03:00
Vladimir Golovnev (Glassez)
582dc99cae Don't access libtorrent session directly from TorrentImpl 2025-05-07 06:52:33 +03:00
Vladimir Golovnev (Glassez)
3691eb948e Join the similar code paths 2025-05-07 06:52:33 +03:00
Vladimir Golovnev (Glassez)
76bb4e5f98 Add helpers to get InfoHash from libtorrent classes 2025-05-07 06:52:23 +03:00
Chocobo1
0262faa915 Merge pull request #22650 from Chocobo1/webui_file_tree
* WebUI: migrate 'file tree' class to JS native class
* WebUI: avoid double lookup
2025-05-05 15:48:24 +08:00
Chocobo1
f1b7c4572b Revise labels for 'duplicate torrent' actions
PR #22645.
2025-05-05 15:38:12 +08:00
Chocobo1
c494314a29 Use short format for displaying RSS entry date
The long format is too verbose and hard to read.

PR #22646.
2025-05-03 23:04:55 +08:00
Chocobo1
559f47ab0c WebUI: avoid double lookup 2025-05-03 22:47:28 +08:00
Chocobo1
380b25e22f WebUI: migrate 'file tree' class to JS native class 2025-05-03 22:41:48 +08:00
Chocobo1
7745ac19d8 Merge pull request #22636 from skomerko/webui-dynamic-classes
Dynamic table classes are now created using modern class syntax (minimal changes to remove Mootools bits).
2025-05-03 22:19:01 +08:00
Vladimir Golovnev
6cd6267c26 Fix ratio handling
PR #22638.
2025-05-01 14:18:18 +03:00
Vladimir Golovnev
e7dee969e1 Remove dubious seeding time max value
PR #22624.
2025-05-01 08:57:10 +03:00
skomerko
bb68a39b53 WebUI: Prefix private properties with # in dynamic table classes 2025-04-29 21:08:26 +02:00
skomerko
4c91cd9372 WebUI: Use modern class syntax to create dynamic table classes 2025-04-29 21:08:17 +02:00
tehcneko
0791828b84 WebUI: fix virtual list defects
Fixes https://github.com/qbittorrent/qBittorrent/pull/22502#issuecomment-2822201721 and https://github.com/qbittorrent/qBittorrent/pull/22502#issuecomment-2822253388.

PR #22597.
2025-04-29 20:16:00 +08:00
Vladimir Golovnev
c2f2a38582 Call QPromise::start() early to avoid race condition
PR #22617.
2025-04-28 18:04:35 +03:00
Chocobo1
ad4bdc0653 Merge pull request #22615 from Chocobo1/webui_eslint
* WebUI: disallow unnecessary semicolons
* WebUI: ensure consistent shorthand syntax
* WebUI: disallow async functions which have no await expression
* WebUI: remove unused variable
2025-04-28 20:20:57 +08:00
Chocobo1
f3095935ea Merge pull request #22549 from skomerko/webui-element-by-id
Mootools `$` alias is no longer used for element lookup (excluding lib files).
Follow up PR for #22523.
2025-04-28 03:34:23 +08:00
Vladimir Golovnev
732b2bcbdb Provide asynchronous results via QFuture
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.
2025-04-27 16:24:07 +03:00
Vladimir Golovnev
33aaa867b5 Drop support of Qt 6.5
PR #22599.
2025-04-27 16:21:20 +03:00
Chocobo1
fdd17159eb WebUI: remove unused variable 2025-04-27 16:19:51 +08:00
Chocobo1
e9fee414df WebUI: disallow async functions which have no await expression 2025-04-27 16:19:51 +08:00
Chocobo1
1077cbba2b WebUI: ensure consistent shorthand syntax 2025-04-27 16:19:50 +08:00
Chocobo1
70dbe9468a WebUI: disallow unnecessary semicolons 2025-04-27 16:19:50 +08:00
Isak05
45babc336d Fix preview not opening on Wayland
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>
2025-04-27 10:02:52 +03:00
Vladimir Golovnev
70822e8942 Fix appearance of search history length spinbox
PR #22605.
2025-04-26 09:28:24 +03:00
Vladimir Golovnev
b5394e7939 Don't interpret wildcard pattern as filepath globbing
PR #22590.
Closes #22583.
2025-04-26 09:27:22 +03:00
skomerko
411ca0f668 WebUI: Use native function for selecting elements by ID 2025-04-23 19:55:04 +02:00
skomerko
7b3aa51bb1 WebUI: Eliminate redundant DOM element queries 2025-04-23 19:49:40 +02:00
sledgehammer999
0b3bce8993 Sync translations from Transifex and run lupdate 2025-04-21 12:30:57 +03:00
bolshoytoster
0160aa28b6 WebUI: Don't update UI if the page is hidden
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.
2025-04-21 17:23:09 +08:00
Chocobo1
0187f19f60 WebUI: migrate away from recursion calls
Browsers have limited recursion depth about ~10000.

PR #22580.
2025-04-21 17:21:18 +08:00
sledgehammer999
e87dfe35f3 Bump copyright year 2025-04-20 23:38:34 +03:00
sledgehammer999
e51be45ce6 Sync translations from Transifex and run lupdate 2025-04-20 23:34:53 +03:00
tehcneko
b4a16f6464 WebUI: Optimize table performance with virtual list
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.
2025-04-20 17:18:26 +08:00
Chocobo1
250fef4ee7 Improve error messages
Print error message to stderr instead of stdout.

PR #22581.
2025-04-20 16:54:49 +08:00
Chocobo1
8fc5d0914d Add versioning to socks.py
Also mark variable as private in novaprinter.py.

PR #22578.
2025-04-20 16:47:45 +08:00
Kostiantyn Chernenok
fc5daf6e1d Clamp seeding time limit in session
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>
2025-04-20 16:34:04 +08:00
Kostiantyn Chernenok
c878a09d27 Swap add file/link buttons on toolbar
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>
2025-04-19 07:57:39 +08:00
Chocobo1
2aee875642 Enforce SOCKS proxy setting in search engine plugins
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.
2025-04-19 07:11:50 +08:00
Vladimir Golovnev
2785636d3f Prevent crash due to corrupted resume data
PR #22569.
Closes #22540.
2025-04-17 11:16:17 +03:00
Vladimir Golovnev
15069b2643 Fix the torrent relocates files when switching to "manual" mode
PR #22564.
Closes #22283.
Closes #22546.
2025-04-16 10:23:34 +03:00
Chocobo1
f0361f1bed Use the proper keyboard shortcut for deleting items on macOS
Closes #20187.
PR #22544.
2025-04-15 15:13:36 +08:00
Vladimir Golovnev
110e6d32b4 Explicitly reject opened Add torrent dialogs when exiting app
PR #22535.
Closes #19933.
Supercedes #22533.
2025-04-14 09:51:59 +03:00
Chocobo1
3d73026ff2 Add SOCKS4/SOCKS4a proxy support to search engine
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.
2025-04-13 16:25:38 +08:00
Chocobo1
abafbc0685 WebUI: avoid saving invalid size
Don't save the wrong size when the tab is collapsed.
Reported in: https://github.com/qbittorrent/qBittorrent/pull/21215/files#r1966052959

PR #22537.
2025-04-12 17:59:42 +08:00
Chocobo1
5465605377 WebUI: fix dark mode in RSS entry viewer
Use `allow-same-origin` sandbox directive to allow fetching the parent CSS.

PR #22536.
2025-04-12 17:54:55 +08:00
luzpaz
9331580e86 Fix grammar
ref: https://github.com/qbittorrent/qBittorrent/pull/19333#discussion_r1793252710

PR #22525.
2025-04-12 17:46:48 +08:00
FredBill1
795889c417 Migrate socks.py from SocksiPy to PySocks 1.7.1
Migrate `socks.py` from SocksiPy 1.01 to [PySocks 1.7.1](c2fa43cbe1/socks.py), allowing python 3+ compatibility, [details](https://github.com/qbittorrent/qBittorrent/issues/16447#issuecomment-2776894026).

The content of the `socks.py` is entirely copied from the [PySocks repository](c2fa43cbe1/socks.py), the only modification is the license header at the top of the file and trimming trail whitespaces.

Closes #16447.
PR #22507.
2025-04-09 17:36:50 +08:00
Chocobo1
ff03eeab5b Show info hash in log when added a duplicate torrent
Closes #22161.
PR #22505.
2025-04-08 16:31:04 +08:00
Chocobo1
f0b9a17566 WebUI: add headers to RSS entry viewer
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.
2025-04-08 15:47:47 +08:00
xavier2k6
72e8b3272b GHA CI: Use Qt 6.9.0 on Windows and macOS
PR #22509.
2025-04-08 15:35:58 +08:00
skomerko
6c36830e5e WebUI: Set status filter to 'All' if selected filter is no longer visible
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.
2025-04-05 17:13:14 +08:00
Chocobo1
cdddaae939 WebUI: fix preferences not applied in magnet handler
Thanks for the diagnosis in this [post](https://github.com/qbittorrent/qBittorrent/issues/22495#issue-2958553624).

Closes #21486.
Closes #22495.
PR #22504.
2025-04-05 13:51:08 +08:00
tehcneko
f540381caf WebUI: Support creating new torrents
Implemented the torrent creator using WebAPI from #20366 in WebUI, the interface is mostly inspired by GUI and VueTorrent.

Closes #5614.
PR #22459.
2025-04-03 17:16:12 +08:00
Vladimir Golovnev
055d82bda4 Add option to enable previous Add new torrent dialog behavior
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).
2025-03-31 09:18:16 +03:00
Chocobo1
0796f96ee4 Merge pull request #22482 from Chocobo1/process_env
Refine environment variable scope
2025-03-30 15:12:10 +08:00
Vladimir Golovnev
841cffafa7 Restore ability to use server-side translation by custom WebUI
PR #20968.
2025-03-30 09:47:21 +03:00
Chocobo1
ade39432be Revise wordings related to SOCKS4 proxy
The affected options are not really incompatible with SOCKS4 but it is due to Qt missing
implementation. Therefore 'unavailable' is more suitable.

PR #22483.
2025-03-29 21:09:49 +08:00
Chocobo1
830d2c207b WebAPI: bump version
Related: https://github.com/qbittorrent/qBittorrent/pull/22460#issuecomment-2748821812

And add initial version of WebAPI changelog.

PR #22481.
2025-03-29 20:47:53 +08:00
Chocobo1
97865545c3 WebUI: fix Tag counter counting wrong
Related: 73e9116d21 (r2014898781)

PR #22480.
2025-03-29 20:41:05 +08:00
Hanabishi
3abdc3134b WebUI: Disable alternative UI in case of the index page being inaccessible
Initial failed access shows an error as before, but on the next reload it falls back to the default WebUI.

PR #22399.
Closes #18401.
2025-03-29 20:32:22 +08:00
Chocobo1
5a716a40fb Simplify proxy related code 2025-03-28 18:39:25 +08:00
Chocobo1
943e403241 Refine environment variable scope
Previously the proxy environment variable will affect the qbt process globally. Now it is
limited to where it required.
2025-03-28 18:15:53 +08:00
Vladimir Golovnev
103ea813dc RSS: Fix crash when moving a folder into its subfolder
PR #22479.
Closes #18446.
2025-03-28 09:03:59 +03:00
Vladimir Golovnev
52b1f3588a RSS: Mark matched article as "read" if refers to duplicate torrent
PR #22477.
2025-03-28 09:01:22 +03:00
Vladimir Golovnev
4bd50672e8 Improve add torrent error handling
PR #22468.
2025-03-25 09:13:15 +03:00
Chocobo1
8c8a0ac54c WebAPI: improve setting preferences behavior
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.
2025-03-24 21:04:35 +08:00
Chocobo1
7b4a3fccc6 WebUI: replace deprecated data type
`Hash` is deprecated by mootools.
Also simplify related code.

PR #22458.
2025-03-23 15:01:39 +08:00
Chocobo1
d21653e8cf Don't leak parent file descriptors to child processes
It is unexpected for the child process to inherit parent file descriptors.
Requires Qt >= 6.6 and only affects Linux.

Closes #10312.
PR #22457.
2025-03-23 14:48:21 +08:00
Vladimir Golovnev
627d89813c RSS: Allow to set refresh interval per feed
PR #22448.
2025-03-22 08:43:04 +03:00
Chocobo1
b28c229f85 Add control for 'hostname resolver cache expiry interval'
Also add a few missing units in WebUI.

Closes #22267.
PR #22439.
2025-03-17 19:40:06 +08:00
Chocobo1
8d0870c953 Switch to string view where applicable
PR #22438.
2025-03-17 19:28:38 +08:00
Chocobo1
5a4b3b25d3 Use slice method where applicable
These code segments already have its boundary checked and can thus be faster.

PR #22411.
2025-03-15 14:58:59 +08:00
Vladimir Golovnev
d174bc75e4 Show free disk space in status bar
PR #22407.
Closes #19607.
2025-03-13 14:47:10 +03:00
Chocobo1
882da47609 Use Qt built-in function for comparing values
PR #22389.
2025-03-10 03:19:31 +08:00
Chocobo1
b74b334e34 Add tests for PeerAddress struct
PR #22388.
2025-03-10 03:11:08 +08:00
Vladimir Golovnev
53f919aea8 Add missing includes
PR #22362.
2025-03-05 09:03:00 +03:00
Chocobo1
62a7fd86d6 Improve "split to byte array views" function
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.
2025-03-03 21:42:03 +08:00
Chocobo1
96295adc08 Merge pull request #22351 from Chocobo1/ci_tweak
Improve CI scripts
2025-03-03 21:28:23 +08:00
skomerko
8f53fb8178 WebUI: Maintain row highlight after rearranging table columns
This PR fixes a bug where row highlight effect would be lost after reordering columns.

PR #22339.
2025-03-02 17:15:21 +08:00
skomerko
37eb80919c WebUI: Fix bug where the 'Tracker editing' dialog displays incorrect data
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.
2025-03-02 17:08:04 +08:00
Chocobo1
1b044d9476 GHA CI: shorten Windows CI build time
Now vcpkg caches b2 tool. Boost doesn't need the exact b2 version to generate the cmake files.
2025-03-01 16:12:59 +08:00
Chocobo1
83599f1f7b GHA CI: tweak cache size
It seems ~500MB is enough to cache all the build artifacts but we still
make it a bit larger to avoid thrashing.
2025-03-01 16:12:57 +08:00
Vladimir Golovnev
6e1b5ec18b Don't miss to declare some of the color IDs
PR #22330.
Closes #22326.
2025-02-25 18:56:15 +03:00
Vladimir Golovnev
249c80aaaf Improve command line parameters serialization
PR #22319.
Closes #22306.
2025-02-25 09:11:03 +03:00
Chocobo1
0ac47496d4 GHA CI: ensure compatibility with newer cmake versions
Fixes #22315.
PR #22320.
2025-02-25 14:08:09 +08:00
Chocobo1
4ec80de268 Update website URL
The website don't use php now.

PR #22321.
2025-02-25 14:03:30 +08:00
skomerko
f432c1e615 WebUI: Show 'Edit tracker URL...' only when one tracker is selected
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.
2025-02-25 13:55:04 +08:00
Chocobo1
41d9ee91a1 WebUI: tell web crawlers do not index the WebUI
PR #22309.
2025-02-23 15:20:22 +08:00
skomerko
ba3d89b674 WebUI: Update sort icon after changing column order
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.
2025-02-23 15:13:17 +08:00
skomerko
1ca33d45ba WebUI: Access element attribute/property natively in log tables
#21007 changed pretty much everything already but I spotted some leftovers and replaced them too.

PR #22294.
2025-02-21 20:54:26 +08:00
Chocobo1
a9b54d94a0 Merge pull request #22282 from skomerko/webui-v51-fixes
WebUI v5.1 fixes
2025-02-21 20:44:42 +08:00
Luke Memet
693390ff27 Fix shift-click selection on macOS
PR #22284.
Closes #16818.
2025-02-19 13:52:51 +03:00
Daniel Nylander
5ddc5a8b87 NSIS: Update Swedish translation
PR #22046.
2025-02-19 13:45:59 +03:00
Bark
ad9100ac07 WebAPI: Do not wrap result if offset is invalid
Closes #22158.
PR #22174.
2025-02-18 13:53:30 +08:00
Chocobo1
1043bea896 Refactor power management classes
Mainly it is about moving each platform code to its own file.

PR #22279.
2025-02-18 11:58:43 +08:00
Chocobo1
955688c125 WebUI: replace rounding function from MooTools
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.
2025-02-17 15:11:55 +08:00
Chocobo1
8da43a4054 Use const accessor
This avoids an unnecessary check to the container internal atomic variable and prevents
potential detachment.

PR #22280.
2025-02-16 15:51:40 +08:00
Chocobo1
ddf6dd5fa2 GHA CI: fix AppImage building
Upstream now defaults to static runtime and the previous URL is invalid now.
Upstream commits:
* c28054bab6
* ce5291e259

Also fuse2 is not needed now as stated on:
https://github.com/AppImage/type2-runtime?tab=readme-ov-file#type2-runtime-

PR #22286.
2025-02-16 05:08:39 +08:00
skomerko
8c02bbb4bc WebUI: Select next available search tab after closing last active tab with X button 2025-02-15 10:59:56 +01:00
skomerko
7e95375cec WebUI: Fix unknown country flag path 2025-02-15 10:59:56 +01:00
skomerko
29201fa016 WebUI: Apply scrollbar style to context menu elements 2025-02-15 10:59:56 +01:00
skomerko
1a3d0f6fab WebUI: Adjust context menu offsets in Search tab & Status filter list 2025-02-15 10:59:56 +01:00
skomerko
f58d6ae984 WebUI: Make context menu target selectors more precise 2025-02-15 10:59:56 +01:00
skomerko
7f0134108a WebUI: Use classlist property to set cell class in trackers table 2025-02-15 10:59:53 +01:00
Chocobo1
d79dc86d00 WebUI: require Subresource Integrity on external links
Also migrate to .mjs format.

PR #22263.
2025-02-12 15:19:07 +08:00
Chocobo1
38070c6eee WebUI: use recommended function for checking NaN values
Also fix a few variable names along the way.

PR #22264.
2025-02-12 15:11:54 +08:00
Vladimir Golovnev
c9eb1fbac8 WebAPI: Don't trim string parameters
PR #22266.
Closes #19485.
Closes #22254.
2025-02-12 09:33:41 +03:00
sledgehammer999
7238bad5a6 Bump to v5.2.0alpha1 2025-02-11 02:04:46 +02:00
508 changed files with 116959 additions and 116737 deletions

2
.github/FUNDING.yml vendored
View File

@@ -1 +1 @@
custom: "https://www.qbittorrent.org/donate.php"
custom: "https://www.qbittorrent.org/donate"

View File

@@ -16,12 +16,12 @@ jobs:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Setup python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "*"
@@ -36,7 +36,7 @@ jobs:
curl \
-L \
-o "${{ runner.temp }}/pandoc.tar.gz" \
"https://github.com/jgm/pandoc/releases/download/3.6/pandoc-3.6-linux-amd64.tar.gz"
"https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-amd64.tar.gz"
tar -xf "${{ runner.temp }}/pandoc.tar.gz" -C "${{ github.workspace }}/.."
mv "${{ github.workspace }}/.."/pandoc-* "${{ env.pandoc_path }}"
# run pandoc
@@ -52,13 +52,13 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install zizmor
IGNORE_RULEID='(.ruleId != "template-injection")
and (.ruleId != "unpinned-uses")'
IGNORE_ID='(.id != "template-injection")
and (.id != "unpinned-uses")'
IGNORE_RULEID='(.ruleId != "zizmor/template-injection")
and (.ruleId != "zizmor/unpinned-uses")'
IGNORE_ID='(.id != "zizmor/template-injection")
and (.id != "zizmor/unpinned-uses")'
zizmor \
--format sarif \
--pedantic \
--persona auditor \
./ \
| jq "(.runs[].results |= map(select($IGNORE_RULEID)))
| (.runs[].tool.driver.rules |= map(select($IGNORE_ID)))" \

View File

@@ -20,7 +20,7 @@ jobs:
matrix:
libt_version: ["2.0.11", "1.2.20"]
qbt_gui: ["GUI=ON", "GUI=OFF"]
qt_version: ["6.7.0"]
qt_version: ["6.9.1"]
env:
boost_path: "${{ github.workspace }}/../boost"
@@ -28,7 +28,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
persist-credentials: false
@@ -43,8 +43,8 @@ jobs:
command: |
brew update > /dev/null
brew install \
cmake ninja \
openssl@3 zlib
# preinstalled on the image: cmake ninja
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
@@ -52,7 +52,7 @@ jobs:
store_cache: ${{ github.ref == 'refs/heads/master' }}
update_packager_index: false
ccache_options: |
max_size=2G
max_size=1G
- name: Install boost
env:
@@ -70,6 +70,9 @@ jobs:
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
fi
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
cd "${{ env.boost_path }}"
./bootstrap.sh
./b2 stage --stagedir=./ --with-headers
- name: Install Qt
uses: jurplel/install-qt-action@v4
@@ -95,7 +98,7 @@ jobs:
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" \
-Ddeprecated-functions=OFF
cmake --build build
sudo cmake --install build
@@ -109,7 +112,7 @@ jobs:
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
@@ -119,17 +122,24 @@ jobs:
- name: Prepare build artifacts
run: |
# create .dmg
appName="qbittorrent"
if [ "${{ matrix.qbt_gui }}" = "GUI=OFF" ]; then
appName="qbittorrent-nox"
fi
# package
pushd build
# packaging
macdeployqt "$appName.app" -no-strip
# code signing
xattr -cr "$appName.app"
codesign --force --sign - \
"$appName.app" \
"$appName.app/Contents/Frameworks"/* \
"$appName.app/Contents/MacOS/$appName"
codesign --verify --deep --strict -v "$appName.app"
# create .dmg
PACKAGE_RETRY=0
while [ "$PACKAGE_RETRY" -lt "3" ]; do
macdeployqt "$appName.app" -dmg -no-strip
if [ -f "$appName.dmg" ]; then
if hdiutil create -fs HFS+ -srcfolder "$appName.app" -volname "$appName" "$appName.dmg"; then
break
fi
sleep 5

View File

@@ -15,17 +15,17 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Setup python (auxiliary scripts)
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3' # use default version
- name: Install tools (auxiliary scripts)
run: pip install bandit pycodestyle pyflakes
run: pip install bandit isort pycodestyle pyflakes
- name: Gather files (auxiliary scripts)
run: |
@@ -44,48 +44,40 @@ jobs:
--max-line-length=1000 \
--statistics \
$PY_FILES
isort \
--check \
--diff \
$PY_FILES
- name: Build code (auxiliary scripts)
run: |
python -m compileall $PY_FILES
- name: Setup python (search engine)
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Install tools (search engine)
run: pip install bandit mypy pycodestyle pyflakes pyright
- name: Gather files (search engine)
working-directory: src/searchengine/nova3
run: |
export "PY_FILES=$(find . -type f -name '*.py' -path '*searchengine*' ! -name 'socks.py' -printf '%p ')"
echo $PY_FILES
echo "PY_FILES=$PY_FILES" >> "$GITHUB_ENV"
pip install uv
uv sync
- name: Check typings (search engine)
run: |
MYPYPATH="src/searchengine/nova3" \
mypy \
--follow-imports skip \
--strict \
$PY_FILES
pyright \
$PY_FILES
working-directory: src/searchengine/nova3
run: uv run just check
- name: Lint code (search engine)
run: |
pyflakes $PY_FILES
bandit --skip B110,B310,B314,B405 $PY_FILES
working-directory: src/searchengine/nova3
run: uv run just lint
- name: Format code (search engine)
working-directory: src/searchengine/nova3
run: |
pycodestyle \
--ignore=E265,E402 \
--max-line-length=1000 \
--statistics \
$PY_FILES
uv run just format
git diff --exit-code
- name: Build code (search engine)
run: |
python -m compileall $PY_FILES
working-directory: src/searchengine/nova3
run: uv run just build

View File

@@ -21,7 +21,7 @@ jobs:
matrix:
libt_version: ["2.0.11", "1.2.20"]
qbt_gui: ["GUI=ON", "GUI=OFF"]
qt_version: ["6.5.2"]
qt_version: ["6.6.3"]
env:
boost_path: "${{ github.workspace }}/../boost"
@@ -30,7 +30,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
persist-credentials: false
@@ -47,7 +47,7 @@ jobs:
store_cache: ${{ github.ref == 'refs/heads/master' }}
update_packager_index: false
ccache_options: |
max_size=2G
max_size=1G
- name: Install boost
env:
@@ -65,6 +65,9 @@ jobs:
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
fi
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
cd "${{ env.boost_path }}"
./bootstrap.sh
./b2 stage --stagedir=./ --with-headers
- name: Install Qt
uses: jurplel/install-qt-action@v4
@@ -90,7 +93,7 @@ jobs:
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" \
-Ddeprecated-functions=OFF
cmake --build build
sudo cmake --install build
@@ -112,7 +115,7 @@ jobs:
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
@@ -138,16 +141,15 @@ jobs:
- name: Install AppImage
run: |
sudo apt install libfuse2
curl \
-L \
-Z \
-O https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-static-x86_64.AppImage \
-O https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-static-x86_64.AppImage \
-O https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage \
-O https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage \
-O https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage
chmod +x \
linuxdeploy-static-x86_64.AppImage \
linuxdeploy-plugin-qt-static-x86_64.AppImage \
linuxdeploy-x86_64.AppImage \
linuxdeploy-plugin-qt-x86_64.AppImage \
linuxdeploy-plugin-appimage-x86_64.AppImage
- name: Prepare files for AppImage
@@ -160,12 +162,13 @@ jobs:
- name: Package AppImage
run: |
./linuxdeploy-static-x86_64.AppImage --appdir qbittorrent --plugin qt
rm -f "${{ runner.workspace }}/Qt/${{ matrix.qt_version }}/gcc_64/plugins/sqldrivers/libqsqlmimer.so"
./linuxdeploy-x86_64.AppImage --appdir qbittorrent --plugin qt
rm qbittorrent/apprun-hooks/*
cp .github/workflows/helper/appimage/export_vars.sh qbittorrent/apprun-hooks/export_vars.sh
NO_APPSTREAM=1 \
OUTPUT=upload/qbittorrent-CI_Ubuntu_x86_64.AppImage \
./linuxdeploy-static-x86_64.AppImage --appdir qbittorrent --output appimage
./linuxdeploy-x86_64.AppImage --appdir qbittorrent --output appimage
- name: Upload build artifacts
uses: actions/upload-artifact@v4

View File

@@ -21,12 +21,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Setup nodejs
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 'lts/*'
@@ -34,21 +34,30 @@ jobs:
run: |
npm install
npm ls
echo "::group::npm ls --all"
npm ls --all
echo "::endgroup::"
- name: Run tests
run: npm test
- name: Lint code
if: ${{ !cancelled() }}
run: npm run lint
- name: Format code
if: ${{ !cancelled() }}
run: |
npm run format
git diff --exit-code
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
if: ${{ !cancelled() }}
with:
config-file: .github/workflows/helper/codeql/js.yaml
languages: javascript
- name: Run CodeQL analysis
if: ${{ !cancelled() }}
uses: github/codeql-action/analyze@v3

View File

@@ -27,7 +27,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
persist-credentials: false
@@ -45,7 +45,7 @@ jobs:
# https://learn.microsoft.com/en-us/vcpkg/users/binarycaching#gha
- name: Set variables for vcpkg
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', (process.env.ACTIONS_CACHE_URL || ''));
@@ -67,6 +67,7 @@ jobs:
"set(VCPKG_BUILD_TYPE release)")
# clear buildtrees after each package installation to reduce disk space requirements
$packages = `
"boost-build:x64-windows-static-md-release",
"openssl:x64-windows-static-md-release",
"zlib:x64-windows-static-md-release"
${{ env.vcpkg_path }}/vcpkg.exe upgrade `
@@ -94,11 +95,18 @@ jobs:
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."
}
move "${{ github.workspace }}/../boost_*" "${{ env.boost_path }}"
cd "${{ env.boost_path }}"
#.\bootstrap.bat
${{ env.vcpkg_path }}/installed/x64-windows-static-md-release/tools/boost-build/b2.exe `
stage `
toolset=msvc `
--stagedir=.\ `
--with-headers
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: "6.8.0"
version: "6.9.1"
arch: win64_msvc2022_64
archives: qtbase qtsvg qttools
cache: true
@@ -113,7 +121,7 @@ jobs:
${{ env.libtorrent_path }}
cd ${{ env.libtorrent_path }}
$env:CXXFLAGS+=" /guard:cf"
$env:LDFLAGS+=" /guard:cf"
$env:LDFLAGS+=" /GUARD:CF"
cmake `
-B build `
-G "Ninja" `
@@ -122,7 +130,7 @@ jobs:
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
-DCMAKE_INSTALL_PREFIX="${{ env.libtorrent_path }}/install" `
-DCMAKE_TOOLCHAIN_FILE="${{ env.vcpkg_path }}/scripts/buildsystems/vcpkg.cmake" `
-DBOOST_ROOT="${{ env.boost_path }}" `
-DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" `
-DBUILD_SHARED_LIBS=OFF `
-Ddeprecated-functions=OFF `
-Dstatic_runtime=OFF `
@@ -139,7 +147,7 @@ jobs:
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
-DCMAKE_TOOLCHAIN_FILE="${{ env.vcpkg_path }}/scripts/buildsystems/vcpkg.cmake" `
-DBOOST_ROOT="${{ env.boost_path }}" `
-DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" `
-DLibtorrentRasterbar_DIR="${{ env.libtorrent_path }}/install/lib/cmake/LibtorrentRasterbar" `
-DMSVC_RUNTIME_DYNAMIC=ON `
-DTESTING=ON `
@@ -191,6 +199,11 @@ jobs:
name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }}
path: upload
- name: Install NSIS
uses: repolevedavaj/install-nsis@265e893c16602d8ccfb0a9ca44173b084078917c # v1.0.3
with:
nsis-version: '3.11'
- name: Create installer
run: |
7z x -o"dist/windows/" "dist/windows/NSISPlugins.zip"

View File

@@ -16,7 +16,7 @@ jobs:
matrix:
libt_version: ["2.0.11"]
qbt_gui: ["GUI=ON"]
qt_version: ["6.5.2"]
qt_version: ["6.9.1"]
env:
boost_path: "${{ github.workspace }}/../boost"
@@ -25,7 +25,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
persist-credentials: false
@@ -39,7 +39,7 @@ jobs:
- name: Install boost
env:
BOOST_MAJOR_VERSION: "1"
BOOST_MINOR_VERSION: "86"
BOOST_MINOR_VERSION: "88"
BOOST_PATCH_VERSION: "0"
run: |
boost_url="https://archives.boost.io/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
@@ -52,6 +52,9 @@ jobs:
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
fi
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
cd "${{ env.boost_path }}"
./bootstrap.sh
./b2 stage --stagedir=./ --with-headers
- name: Install Qt
uses: jurplel/install-qt-action@v4
@@ -74,7 +77,7 @@ jobs:
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_STANDARD=20 \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" \
-Ddeprecated-functions=OFF
cmake --build build
sudo cmake --install build
@@ -98,7 +101,7 @@ jobs:
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DBOOST_ROOT="${{ env.boost_path }}/lib/cmake" \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
PATH="${{ env.coverity_path }}/bin:$PATH" \

View File

@@ -26,12 +26,12 @@
# but you are not obligated to do so. If you do not wish to do so, delete this
# exception statement from your version.
from collections.abc import Callable, Sequence
from typing import Optional
import argparse
import re
import xml.etree.ElementTree as ElementTree
import sys
import xml.etree.ElementTree as ElementTree
from collections.abc import Callable, Sequence
from typing import Optional
def traversePostOrder(root: ElementTree.Element, visitFunc: Callable[[ElementTree.Element], None]) -> None:

View File

@@ -26,11 +26,11 @@
# but you are not obligated to do so. If you do not wish to do so, delete this
# exception statement from your version.
from collections.abc import Sequence
from typing import Optional
import argparse
import re
import sys
from collections.abc import Sequence
from typing import Optional
def main(argv: Optional[Sequence[str]] = None) -> int:

View File

@@ -13,7 +13,7 @@ jobs:
pull-requests: write
steps:
- name: Mark and close stale PRs
uses: actions/stale@v9
uses: actions/stale@v10
with:
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."

2
.gitignore vendored
View File

@@ -1,4 +1,5 @@
.vscode/
src/gui/geoip/GeoIP.dat
src/gui/geoip/GeoIP.dat.gz
src/qbittorrent
@@ -10,7 +11,6 @@ CMakeLists.txt.user*
qbittorrent.pro.user*
conf.pri
Makefile*
*.pyc
*.log
# Compiled object files

View File

@@ -19,7 +19,7 @@ repos:
- ts
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-json
name: Check JSON files
@@ -69,11 +69,11 @@ repos:
- ts
- repo: https://github.com/codespell-project/codespell.git
rev: v2.4.0
rev: v2.4.1
hooks:
- id: codespell
name: Check spelling (codespell)
args: ["--ignore-words-list", "additionals,categor,curren,fo,ist,ket,notin,searchin,sectionin,superseeding,te,ths"]
args: ["--ignore-words-list", "additionals,categor,curren,fo,indexIn,ist,ket,notin,searchin,sectionin,superseeding,te,ths"]
exclude: |
(?x)^(
.*\.desktop |
@@ -88,7 +88,7 @@ repos:
- ts
- repo: https://github.com/crate-ci/typos.git
rev: v1.29.4
rev: v1.35.3
hooks:
- id: typos
name: Check spelling (typos)

View File

@@ -8,7 +8,7 @@ project(qBittorrent
# version requirements - older versions may work, but you are on your own
set(minBoostVersion 1.76)
set(minQt6Version 6.5.0)
set(minQt6Version 6.6.0)
set(minOpenSSLVersion 3.0.2)
set(minLibtorrent1Version 1.2.19)
set(minLibtorrentVersion 2.0.10)

View File

@@ -11,7 +11,7 @@ qBittorrent - A BitTorrent client in C++ / Qt
- OpenSSL >= 3.0.2
- Qt 6.5.0 - 6.x
- Qt 6.6.0 - 6.x
- zlib >= 1.2.11

88
WebAPI_Changelog.md Normal file
View File

@@ -0,0 +1,88 @@
# WebAPI Changelog
## 2.14.0
* [#23202](https://github.com/qbittorrent/qBittorrent/pull/23202)
* WebAPI responds with the error message "Endpoint does not exist" when the endpoint does not exist, to better differentiate from unrelated Not Found (i.e. 404) responses
* `auth/login` endpoint responds to invalid credentials with a 401
* `torrents/add` endpoint responds with `success_count`, `pending_count`, `failure_count`, and `added_torrent_ids`
* When `pending_count` is non-zero, response code 202 is used
* When all torrents fail to be added, response code 409 is used
## 2.13.1
* [#23163](https://github.com/qbittorrent/qBittorrent/pull/23163)
* `torrents/add` endpoint now supports downloading from a search plugin via the `downloader` parameter
* `torrents/fetchMetadata` endpoint now supports fetching from a search plugin via the `downloader` parameter
* [#23088](https://github.com/qbittorrent/qBittorrent/pull/23088)
* Add `clientdata/load` and `clientdata/store` endpoints for managing WebUI-specific client settings and other shared data
## 2.13.0
* [#23045](https://github.com/qbittorrent/qBittorrent/pull/23045)
* `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`
* [#22963](https://github.com/qbittorrent/qBittorrent/pull/22963)
* `torrents/editTracker` endpoint now supports setting a tracker's tier via `tier` parameter
* `torrents/editTracker` endpoint always responds with a 204 when successful
* `torrents/editTracker` endpoint `origUrl` parameter renamed to `url`
* [#23061](https://github.com/qbittorrent/qBittorrent/pull/23061)
* `sync/torrentPeers` returns one new field: `i2p_dest`, only when the peer is from I2P
* In this case, the fields `ip` and `port` are not returned
* [#23085](https://github.com/qbittorrent/qBittorrent/pull/23085)
* `torrents/parseMetadata` now responds with an array of metadata in the same order as the files in the request. It previously responded with an object keyed off of the submitted file name.
## 2.12.1
* [#23031](https://github.com/qbittorrent/qBittorrent/pull/23031)
* Add `torrents/setComment` endpoint with parameters `hashes` and `comment` for setting a new torrent comment
## 2.12.0
* [#22989](https://github.com/qbittorrent/qBittorrent/pull/22989)
* `sync/maindata` returns one new field: `share_limit_action`
* `torrents/setShareLimits` now requires a new `shareLimitAction` param that sets a torrent's shareLimitAction property
* possible values `Default`, `Stop`, `Remove`, `RemoveWithContent` and `EnableSuperSeeding`
## 2.11.10
* [#22958](https://github.com/qbittorrent/qBittorrent/pull/22958)
* `torrents/categories` and `sync/maindata` now serialize categories' `downloadPath` to `null`, rather than `undefined`
* [#22954](https://github.com/qbittorrent/qBittorrent/pull/22954)
* `torrents/reannounce` supports specifying individual trackers via `trackers` field
## 2.11.9
* [#21015](https://github.com/qbittorrent/qBittorrent/pull/21015)
* Add `torrents/fetchMetadata` endpoint for retrieving torrent metadata associated with a URL
* Add `torrents/parseMetadata` endpoint for retrieving torrent metadata associated with a .torrent file
* Add `torrents/saveMetadata` endpoint for saving retrieved torrent metadata to a .torrent file
* `torrents/add` allows adding a torrent with metadata previously retrieved via `torrents/fetchMetadata` or `torrents/parseMetadata`
* `torrents/add` allows specifying a torrent's file priorities
* [#22698](https://github.com/qbittorrent/qBittorrent/pull/22698)
* `torrents/addTrackers` and `torrents/removeTrackers` now accept `hash=all` and adds/removes the tracker to/from *all* torrents
* For compatibility, `torrents/removeTrackers` still accepts `hash=*` internally we transform it into `all`
* Allow passing a pipe (`|`) separated list of hashes in `hash` for `torrents/addTrackers` and `torrents/removeTrackers`
## 2.11.8
* [#21349](https://github.com/qbittorrent/qBittorrent/pull/21349)
* Handle sending `204 No Content` status code when response contains no data
* Some endpoints still return `200 OK` to ensure smooth transition
* [#22750](https://github.com/qbittorrent/qBittorrent/pull/22750)
* `torrents/info` allows an optional parameter `includeFiles` that defaults to `false`
* Each torrent will contain a new key `files` which will list all files similar to the `torrents/files` endpoint
* [#22813](https://github.com/qbittorrent/qBittorrent/pull/22813)
* `app/getDirectoryContent` allows an optional parameter `withMetadata` to send file metadata
* Fields are `name`, `type`, `size`, `creation_date`, `last_access_date`, `last_modification_date`
* See PR for TypeScript types
## 2.11.7
* [#22166](https://github.com/qbittorrent/qBittorrent/pull/22166)
* `sync/maindata` returns 3 new torrent fields: `has_tracker_warning`, `has_tracker_error`, `has_other_announce_error`
## 2.11.6
* [#22460](https://github.com/qbittorrent/qBittorrent/pull/22460)
* `app/setPreferences` allows only one of `max_ratio_enabled`, `max_ratio` to be present
* `app/setPreferences` allows only one of `max_seeding_time_enabled`, `max_seeding_time` to be present
* `app/setPreferences` allows only one of `max_inactive_seeding_time_enabled`, `max_inactive_seeding_time` to be present

View File

@@ -47,6 +47,9 @@ find_package(Boost ${minBoostVersion} REQUIRED)
find_package(OpenSSL ${minOpenSSLVersion} REQUIRED)
find_package(ZLIB ${minZlibVersion} REQUIRED)
find_package(Qt6 ${minQt6Version} REQUIRED COMPONENTS Core Network Sql Xml LinguistTools)
if (Qt6_FOUND AND (Qt6_VERSION VERSION_GREATER_EQUAL 6.10))
find_package(Qt6 ${minQt6Version} REQUIRED COMPONENTS CorePrivate)
endif()
if (DBUS)
find_package(Qt6 ${minQt6Version} REQUIRED COMPONENTS DBus)
set_package_properties(Qt6DBus PROPERTIES

View File

@@ -20,10 +20,11 @@ target_compile_features(qbt_common_cfg INTERFACE
)
target_compile_definitions(qbt_common_cfg INTERFACE
QT_DISABLE_DEPRECATED_UP_TO=0x060500
QT_DISABLE_DEPRECATED_UP_TO=0x060600
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_BYTEARRAY
QT_NO_CONTEXTLESS_CONNECT
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
QT_USE_QSTRINGBUILDER
QT_STRICT_ITERATORS
@@ -89,7 +90,7 @@ if (MSVC)
/Zc:__cplusplus
)
target_link_options(qbt_common_cfg INTERFACE
/guard:cf
/GUARD:CF
$<$<NOT:$<CONFIG:Debug>>:/OPT:REF /OPT:ICF>
# suppress linking warning due to /INCREMENTAL and /OPT:ICF being both ON
$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL:NO>

4
dist/mac/Info.plist vendored
View File

@@ -55,7 +55,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>5.1.0</string>
<string>5.2.0</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
@@ -67,7 +67,7 @@
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2006-2024 The qBittorrent project</string>
<string>Copyright © 2006-2025 The qBittorrent project</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>

Binary file not shown.

Binary file not shown.

View File

@@ -34,12 +34,12 @@ endforeach()
if (GUI)
install(FILES org.qbittorrent.qBittorrent.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications
COMPONENT data
)
install(FILES org.qbittorrent.qBittorrent.metainfo.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo/
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo
COMPONENT data
)
@@ -55,4 +55,9 @@ if (GUI)
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status
COMPONENT data
)
else()
install(FILES org.qbittorrent.qBittorrent-nox.metainfo.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo
COMPONENT data
)
endif()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 750 B

After

Width:  |  Height:  |  Size: 747 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 750 B

After

Width:  |  Height:  |  Size: 747 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Some files were not shown because too many files have changed in this diff Show More