mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-12 19:28:42 +00:00
fix edit trackers to be async
This commit is contained in:
parent
3aca2fa33c
commit
6438cb0121
1 changed files with 10 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue