Commit graph

13362 commits

Author SHA1 Message Date
Thomas Piccirello
b7a43ea118
WebAPI: Cache metadata using TorrentID
Some checks failed
CI - File health / Check (push) Has been cancelled
CI - macOS / Build (push) Has been cancelled
CI - Python / Check (push) Has been cancelled
CI - Ubuntu / Build (push) Has been cancelled
CI - WebUI / Check (push) Has been cancelled
CI - Windows / Build (push) Has been cancelled
`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
Some checks failed
CI - File health / Check (push) Has been cancelled
CI - macOS / Build (push) Has been cancelled
CI - Python / Check (push) Has been cancelled
CI - Ubuntu / Build (push) Has been cancelled
CI - WebUI / Check (push) Has been cancelled
CI - Windows / Build (push) Has been cancelled
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
Some checks are pending
CI - File health / Check (push) Waiting to run
CI - macOS / Build (push) Waiting to run
CI - Python / Check (push) Waiting to run
CI - Ubuntu / Build (push) Waiting to run
CI - WebUI / Check (push) Waiting to run
CI - Windows / Build (push) Waiting to run
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
Some checks failed
CI - File health / Check (push) Has been cancelled
CI - macOS / Build (push) Has been cancelled
CI - Python / Check (push) Has been cancelled
CI - Ubuntu / Build (push) Has been cancelled
CI - WebUI / Check (push) Has been cancelled
CI - Windows / Build (push) Has been cancelled
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
Some checks failed
CI - File health / Check (push) Has been cancelled
CI - macOS / Build (push) Has been cancelled
CI - Python / Check (push) Has been cancelled
CI - Ubuntu / Build (push) Has been cancelled
CI - WebUI / Check (push) Has been cancelled
CI - Windows / Build (push) Has been cancelled
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
Some checks are pending
CI - File health / Check (push) Waiting to run
CI - macOS / Build (push) Waiting to run
CI - Python / Check (push) Waiting to run
CI - Ubuntu / Build (push) Waiting to run
CI - WebUI / Check (push) Waiting to run
CI - Windows / Build (push) Waiting to run
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
Some checks failed
CI - File health / Check (push) Has been cancelled
CI - macOS / Build (push) Has been cancelled
CI - Python / Check (push) Has been cancelled
CI - Ubuntu / Build (push) Has been cancelled
CI - WebUI / Check (push) Has been cancelled
CI - Windows / Build (push) Has been cancelled
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
Some checks failed
CI - File health / Check (push) Has been cancelled
CI - macOS / Build (push) Has been cancelled
CI - Python / Check (push) Has been cancelled
CI - Ubuntu / Build (push) Has been cancelled
CI - WebUI / Check (push) Has been cancelled
CI - Windows / Build (push) Has been cancelled
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
Some checks are pending
CI - File health / Check (push) Waiting to run
CI - macOS / Build (push) Waiting to run
CI - Python / Check (push) Waiting to run
CI - Ubuntu / Build (push) Waiting to run
CI - WebUI / Check (push) Waiting to run
CI - Windows / Build (push) Waiting to run
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
Some checks failed
CI - File health / Check (push) Has been cancelled
CI - macOS / Build (push) Has been cancelled
CI - Python / Check (push) Has been cancelled
CI - Ubuntu / Build (push) Has been cancelled
CI - WebUI / Check (push) Has been cancelled
CI - Windows / Build (push) Has been cancelled
PR #21015.
2025-06-17 10:15:21 +03:00
Chocobo1
3cd40cc5a2
Merge pull request #22867 from Chocobo1/webui_defer
Some checks are pending
CI - File health / Check (push) Waiting to run
CI - macOS / Build (push) Waiting to run
CI - Python / Check (push) Waiting to run
CI - Ubuntu / Build (push) Waiting to run
CI - WebUI / Check (push) Waiting to run
CI - Windows / Build (push) Waiting to run
* 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
Some checks failed
CI - Ubuntu / Build (push) Has been cancelled
CI - File health / Check (push) Has been cancelled
CI - macOS / Build (push) Has been cancelled
CI - Python / Check (push) Has been cancelled
CI - WebUI / Check (push) Has been cancelled
CI - Windows / Build (push) Has been cancelled
* 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