sort the trackers

This commit is contained in:
iou1name 2019-02-20 13:16:50 -05:00
parent fd4fbb5083
commit 463ccdfcdf

View File

@ -172,6 +172,7 @@ def get_stats():
trackers[torrent.tracker][i] += stats[i] trackers[torrent.tracker][i] += stats[i]
else: else:
trackers[torrent.tracker] = stats trackers[torrent.tracker] = stats
trackers = dict(sorted(trackers.items()))
total = [0]*3 total = [0]*3
for i in range(len(total)): for i in range(len(total)):
total[i] = sum([v[i] for _, v in trackers.items()]) total[i] = sum([v[i] for _, v in trackers.items()])