Skip to content

Conversation

@AlfEspadero
Copy link

@AlfEspadero AlfEspadero commented Nov 27, 2025

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

  • New context menu options in the Transfer List: "Group Selected Torrents", "Remove from Group".
  • Torrents belonging to a group are now displayed under a collapsible header row.

Verification

Tested on Linux.
Verified that grouping/ungrouping persists correctly.
Verified that sorting and filtering still work as expected when groups are active.

Screenshots

  • Expanded group
image - Collapsed group image

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.

AlfEspadero and others added 5 commits August 20, 2025 04:25
- Added TorrentGroup and TorrentGroupManager classes to manage torrent groups.
- Enhanced TransferListWidget to support grouping of torrents, including creation, renaming, and deletion of groups.
- Integrated group management into the UI, allowing users to add torrents to groups and remove them.
- Implemented TransferListGroupModel to provide a hierarchical view of torrents grouped by their respective categories.
- Added context menu actions for group operations in the TransferListWidget.
- Ensured persistence of group states and settings through loading and saving mechanisms.
- Updated UI elements to reflect group states and provide visual differentiation between groups and individual torrents.
Implement a lightweight grouping concept for UI aggregation, allowing
users to group torrents (e.g. by Season).

This feature introduces:
- TorrentGroupManager for managing group definitions and membership.
- TransferListGroupModel as a proxy model to display groups in the
  transfer list.
- UI integration in TransferListWidget to support group expansion and
  rendering.

Groups are stored in the configuration and persist across sessions.
@stalkerok
Copy link
Contributor

@qbittorrent/bug-handlers
Does anyone have any thoughts on this feature?
IMO, it's a pretty useful feature.

@flic1
Copy link

flic1 commented Jan 22, 2026

looks promising! when is the ETA?

@xavier2k6 xavier2k6 closed this Jan 22, 2026
@xavier2k6 xavier2k6 reopened this Jan 22, 2026
@xavier2k6
Copy link
Member

xavier2k6 commented Jan 22, 2026

closed/re-opened to trigger ci

@xavier2k6
Copy link
Member

looks promising! when is the ETA?

If approved, qBittorrent 5.2+

@xavier2k6 xavier2k6 added the GUI GUI-related issues/changes label Jan 22, 2026
@xavier2k6 xavier2k6 added this to the 5.2 milestone Jan 22, 2026
@xavier2k6 xavier2k6 requested a review from a team January 22, 2026 22:48
@flic1
Copy link

flic1 commented Jan 22, 2026

looks promising! when is the ETA?

If approved, qBittorrent 5.2+

I can help you test if needed

@AlfEspadero
Copy link
Author

windows is the bane of my existence

@AlfEspadero
Copy link
Author

I think that might fix the windows CI crash, i should've said it in the commit

@glassez
Copy link
Member

glassez commented Jan 23, 2026

This feature provides a lightweight, visual-only organization method to keep the transfer list tidy.

So why did some related things get into the core?

@glassez glassez removed this from the 5.2 milestone Jan 23, 2026
@glassez
Copy link
Member

glassez commented Jan 23, 2026

Screenshots

  • Expanded group

image - Collapsed group image

It looks confusing to me, as I don't see a clear difference between a collapsed and an expanded group. Why not stick to the usual pattern and show nested elements with an indentation?

@AlfEspadero
Copy link
Author

This feature provides a lightweight, visual-only organization method to keep the transfer list tidy.

So why did some related things get into the core?

I found this to be the simplest way of going about it as I didn't really know where to lay the foundation for the groups

@AlfEspadero
Copy link
Author

Screenshots

  • Expanded group

image - Collapsed group image

It looks confusing to me, as I don't see a clear difference between a collapsed and an expanded group. Why not stick to the usual pattern and show nested elements with an indentation?

I actually agree, I only used those two icons because they were already in the project so I didn't have to make new ones.
I also tried doing it with indentation first but however many times I tried it always resulted in buggy and weird behaviour, if you have any tips I would be glad to try and correct it

@glassez
Copy link
Member

glassez commented Jan 24, 2026

This feature provides a lightweight, visual-only organization method to keep the transfer list tidy.

So why did some related things get into the core?

I found this to be the simplest way of going about it as I didn't really know where to lay the foundation for the groups

Even without going into details (which I have not yet been able to go into), the following looks quite obvious:

  1. the relevant files should be located in the "gui" directory instead of "base",
  2. there is no need to have a global instance of TorrentGroupManager, it may well be owned by related model or widget class.

@glassez
Copy link
Member

glassez commented Jan 24, 2026

I also tried doing it with indentation first but however many times I tried it always resulted in buggy and weird behaviour, if you have any tips I would be glad to try and correct it

I have briefly reviewed the code of this PR. It seems that you haven't familiarized yourself with the basics of Qt Model/View architecture enough, since you've taken such a strange way. IMO, it would be natural to turn the TransferListModel into a "tree model", i.e. change base class from QAbstractListModel to QAbstractItemModel and implement all the relevant stuff that are missing currently. You can take our TorrentContentModel as an example of "tree model".

@glassez
Copy link
Member

glassez commented Jan 24, 2026

@Chocobo1
Do you have any thoughts about this PR and my preliminary comments?

@Chocobo1
Copy link
Member

Chocobo1 commented Jan 24, 2026

@Chocobo1
Do you have any thoughts about this PR

Nothing really as I'm not the target audience of this PR. I only hope the result isn't something that is complex and confusing to the users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GUI GUI-related issues/changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI: Ability to move selected torrents into a collapsed meta-group within the download list

7 participants