Add virtual torrent grouping feature #23551
Open
+1,115
−37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a "Virtual Torrent Grouping" feature to the main transfer list. It allows users to visually group multiple torrents together under a single collapsible header in the GUI, without affecting their underlying save paths, categories, or tags.
Closes #19935
Motivation
Currently, users managing large numbers of related torrents (e.g., episodes of a TV season, albums in a discography) find their transfer list cluttered. While Categories and Tags provide filtering, they do not offer a way to condense these items in the main view. This feature provides a lightweight, visual-only organization method to keep the transfer list tidy.
Implementation Details
Core Logic: Added TorrentGroup and TorrentGroupManager in base to manage group associations and state.
GUI Model: Implemented TransferListGroupModel in gui. This acts as an intermediary model to handle the tree-like structure required for collapsible groups within the existing list framework.
Widget Update: Refactored TransferListWidget to support the new grouping mode and context menu actions for creating/managing groups.
UI Changes
Verification
Tested on Linux.
Verified that grouping/ungrouping persists correctly.
Verified that sorting and filtering still work as expected when groups are active.
Screenshots
Note to reviewers
I am a freshly graduated student and this is my first major contribution to the qBittorrent codebase. I have done my best to follow the coding guidelines and style, but I am happy to make any necessary adjustments based on your feedback.