mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
Tracker errors now change the tracker status
This commit is contained in:
parent
53853f043e
commit
6afe33d584
2 changed files with 13 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
Deluge 0.9.08 - "1.0.0_RC8" (In Development)
|
||||
Core:
|
||||
* Attempt to automatically upgrade a 0.5.x state file to new format
|
||||
* Tracker errors now change the tracker status
|
||||
|
||||
Plugins:
|
||||
* Fix bug in Blocklist that prevented downloading a new file every X days
|
||||
|
|
|
@ -145,6 +145,8 @@ class TorrentManager(component.Component):
|
|||
self.alerts.register_handler("tracker_alert", self.on_alert_tracker)
|
||||
self.alerts.register_handler("tracker_warning_alert",
|
||||
self.on_alert_tracker_warning)
|
||||
self.alerts.register_handler("tracker_error_alert",
|
||||
self.on_alert_tracker_error)
|
||||
self.alerts.register_handler("storage_moved_alert",
|
||||
self.on_alert_storage_moved)
|
||||
self.alerts.register_handler("torrent_resumed_alert",
|
||||
|
@ -709,6 +711,16 @@ class TorrentManager(component.Component):
|
|||
self.torrents[torrent_id].set_tracker_status(tracker_status)
|
||||
except KeyError:
|
||||
log.debug("torrent_id doesn't exist.")
|
||||
|
||||
def on_alert_tracker_error(self, alert):
|
||||
log.debug("on_alert_tracker_error")
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
|
||||
tracker_status = "%s: %s" % (_("Error"), str(alert.message()))
|
||||
try:
|
||||
torrent.set_tracker_status(tracker_status)
|
||||
except KeyError:
|
||||
log.debug("torrent_id doesn't exist.")
|
||||
|
||||
def on_alert_storage_moved(self, alert):
|
||||
log.debug("on_alert_storage_moved")
|
||||
|
|
Loading…
Add table
Reference in a new issue