qBittorrent
qBittorrent copied to clipboard
Fix newly added trackers being incorrectly all tier 0
This PR changes tier of the automatically added trackers to start with existing_max_tier + 1
.
In current implementation, tier of additional trackers are initialized with default value 0. To address this, on adding additional trackers, the max tier of existing trackers is looked up and +1 for every additional tracker added.
Closes #20102
Putting 3 testing trackers in "automatically added list"
Before: Additional trackers are added with all tier = 0
After: Additional trackers are added with tier after the existing trackers in sequential order.
Updated PR to remove accidentally added trailing spaces.
ps. I still haven't finished a complete round of review as the new code confuses me.. I'm considering taking the matter on to my hands and submit my revision later.
yup, agree that it is a bit messed up here. Maybe need further discussion on the behavior of tracker tiers beforehand.
Superseded by #20729. Thanks for the effort @DoubleSpicy !