mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
when removing trackers, handle hidden duplicates
This commit is contained in:
@@ -313,14 +313,14 @@
|
||||
if (groupSelected || [selectedIndexes containsIndex: i])
|
||||
{
|
||||
Torrent * torrent = [(TrackerNode *)object torrent];
|
||||
NSMutableIndexSet * removeIndexSet;
|
||||
if (!(removeIndexSet = [removeIdentifiers objectForKey: torrent]))
|
||||
NSMutableSet * removeSet;
|
||||
if (!(removeSet = [removeIdentifiers objectForKey: torrent]))
|
||||
{
|
||||
removeIndexSet = [NSMutableIndexSet indexSet];
|
||||
[removeIdentifiers setObject: removeIndexSet forKey: torrent];
|
||||
removeSet = [NSMutableSet set];
|
||||
[removeIdentifiers setObject: removeSet forKey: torrent];
|
||||
}
|
||||
|
||||
[removeIndexSet addIndex: [(TrackerNode *)object identifier]];
|
||||
[removeSet addObject: [(TrackerNode *)object fullAnnounceAddress]];
|
||||
++removeCount;
|
||||
}
|
||||
}
|
||||
@@ -370,7 +370,7 @@
|
||||
}
|
||||
|
||||
for (Torrent * torrent in removeIdentifiers)
|
||||
[torrent removeTrackersWithIdentifiers: [removeIdentifiers objectForKey: torrent]];
|
||||
[torrent removeTrackers: [removeIdentifiers objectForKey: torrent]];
|
||||
|
||||
//reset table with either new or old value
|
||||
[fTrackers release];
|
||||
|
||||
Reference in New Issue
Block a user