Fix displaying file errors when the torrent isn't paused
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
=== Deluge 1.1.4 - (In Development) ===
|
||||
==== Core ====
|
||||
* Fix displaying file errors when the torrent isn't paused
|
||||
|
||||
==== GtkUI ====
|
||||
* Fix hiding bottom pane when no tabs are enabled upon restart
|
||||
* Fix saving file priorities when switching torrents in the addtorrentdialog
|
||||
|
@ -357,11 +357,12 @@ class Torrent:
|
||||
|
||||
# First we check for an error from libtorrent, and set the state to that
|
||||
# if any occurred.
|
||||
if self.handle.is_paused() and len(self.handle.status().error) > 0:
|
||||
if len(self.handle.status().error) > 0:
|
||||
# This is an error'd torrent
|
||||
self.state = "Error"
|
||||
self.set_status_message(self.handle.status().error)
|
||||
self.handle.auto_managed(False)
|
||||
if self.handle.is_paused():
|
||||
self.handle.auto_managed(False)
|
||||
return
|
||||
|
||||
if ltstate == LTSTATE["Queued"] or ltstate == LTSTATE["Checking"]:
|
||||
|
@ -165,6 +165,8 @@ class TorrentManager(component.Component):
|
||||
self.on_alert_file_renamed)
|
||||
self.alerts.register_handler("metadata_received_alert",
|
||||
self.on_alert_metadata_received)
|
||||
self.alerts.register_handler("file_error_alert",
|
||||
self.on_alert_file_error)
|
||||
|
||||
def start(self):
|
||||
# Get the pluginmanager reference
|
||||
@ -784,3 +786,8 @@ class TorrentManager(component.Component):
|
||||
log.debug("on_alert_metadata_received")
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
torrent.write_torrentfile()
|
||||
|
||||
def on_alert_file_error(self, alert):
|
||||
log.debug("on_alert_file_error: %s", alert.message())
|
||||
torrent = self.torrents[str(alert.handle.info_hash())]
|
||||
torrent.update_state()
|
||||
|
Reference in New Issue
Block a user