mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-31 05:35:31 +00:00
fix edit trackers to be async
This commit is contained in:
parent
3aca2fa33c
commit
6438cb0121
@ -86,12 +86,19 @@ class EditTrackersDialog:
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Get the trackers for this torrent
|
# Get the trackers for this torrent
|
||||||
trackers = client.get_torrent_status(self.torrent_id, ["trackers"])
|
|
||||||
for tracker in trackers["trackers"]:
|
client.get_torrent_status(self._on_get_torrent_status, self.torrent_id,\
|
||||||
|
["trackers"])
|
||||||
|
|
||||||
|
def _on_get_torrent_status(self, status):
|
||||||
|
"""Display trackers dialog"""
|
||||||
|
for tracker in status["trackers"]:
|
||||||
self.add_tracker(tracker["tier"], tracker["url"])
|
self.add_tracker(tracker["tier"], tracker["url"])
|
||||||
|
|
||||||
self.dialog.show()
|
self.dialog.show()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def add_tracker(self, tier, url):
|
def add_tracker(self, tier, url):
|
||||||
"""Adds a tracker to the list"""
|
"""Adds a tracker to the list"""
|
||||||
self.liststore.append([tier, url])
|
self.liststore.append([tier, url])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user