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