qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

Fix newly added trackers being incorrectly all tier 0

Open DoubleSpicy opened this issue 4 months ago • 1 comments

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" image Before: Additional trackers are added with all tier = 0 image

After: Additional trackers are added with tier after the existing trackers in sequential order. image

DoubleSpicy avatar Feb 13 '24 18:02 DoubleSpicy

Updated PR to remove accidentally added trailing spaces.

DoubleSpicy avatar Feb 13 '24 18:02 DoubleSpicy

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.

DoubleSpicy avatar Feb 23 '24 11:02 DoubleSpicy

Superseded by #20729. Thanks for the effort @DoubleSpicy !

Chocobo1 avatar Apr 25 '24 04:04 Chocobo1