Commit Graph

13492 Commits

Author SHA1 Message Date
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