Fix #1510 - Cannot create a torrent with only non-zero tier trackers
This commit is contained in:
parent
376a23e6fd
commit
553f35eae5
|
@ -285,14 +285,11 @@ class CreateTorrentDialog:
|
|||
tracker = None
|
||||
else:
|
||||
# Create a list of lists [[tier0, ...], [tier1, ...], ...]
|
||||
tier_dict = {}
|
||||
for tier, tracker in self.trackers_liststore:
|
||||
try:
|
||||
tier_list = trackers[tier]
|
||||
except IndexError:
|
||||
trackers.insert(tier, [])
|
||||
|
||||
trackers[tier].append(tracker)
|
||||
tier_dict.setdefault(tier, []).append(tracker)
|
||||
|
||||
trackers = [tier_dict[tier] for tier in sorted(tier_dict)]
|
||||
# Get the first tracker in the first tier
|
||||
tracker = trackers[0][0]
|
||||
|
||||
|
|
Loading…
Reference in New Issue