mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 06:58:42 +00:00
Fix displaying errors when a torrent is Checking
This commit is contained in:
parent
76f56957ce
commit
79e6ecfbac
2 changed files with 12 additions and 6 deletions
|
@ -2,6 +2,7 @@ Deluge 1.1.3 - (In Development)
|
||||||
Misc:
|
Misc:
|
||||||
* Fix issue when initializing gettext that would prevent deluge from starting
|
* Fix issue when initializing gettext that would prevent deluge from starting
|
||||||
* Fix logging exceptions when starting the daemon
|
* Fix logging exceptions when starting the daemon
|
||||||
|
* Fix displaying errors when a torrent is Checking
|
||||||
|
|
||||||
Deluge 1.1.2 - (31 January 2009)
|
Deluge 1.1.2 - (31 January 2009)
|
||||||
Core:
|
Core:
|
||||||
|
|
|
@ -354,6 +354,16 @@ class Torrent:
|
||||||
|
|
||||||
log.debug("set_state_based_on_ltstate: %s", deluge.common.LT_TORRENT_STATE[ltstate])
|
log.debug("set_state_based_on_ltstate: %s", deluge.common.LT_TORRENT_STATE[ltstate])
|
||||||
log.debug("session.is_paused: %s", component.get("Core").session.is_paused())
|
log.debug("session.is_paused: %s", component.get("Core").session.is_paused())
|
||||||
|
|
||||||
|
# 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:
|
||||||
|
# This is an error'd torrent
|
||||||
|
self.state = "Error"
|
||||||
|
self.set_status_message(self.handle.status().error)
|
||||||
|
self.handle.auto_managed(False)
|
||||||
|
return
|
||||||
|
|
||||||
if ltstate == LTSTATE["Queued"] or ltstate == LTSTATE["Checking"]:
|
if ltstate == LTSTATE["Queued"] or ltstate == LTSTATE["Checking"]:
|
||||||
self.state = "Checking"
|
self.state = "Checking"
|
||||||
return
|
return
|
||||||
|
@ -364,12 +374,7 @@ class Torrent:
|
||||||
elif ltstate == LTSTATE["Allocating"]:
|
elif ltstate == LTSTATE["Allocating"]:
|
||||||
self.state = "Allocating"
|
self.state = "Allocating"
|
||||||
|
|
||||||
if self.handle.is_paused() and len(self.handle.status().error) > 0:
|
if self.handle.is_paused() and self.handle.is_auto_managed() and not component.get("Core").session.is_paused():
|
||||||
# This is an error'd torrent
|
|
||||||
self.state = "Error"
|
|
||||||
self.set_status_message(self.handle.status().error)
|
|
||||||
self.handle.auto_managed(False)
|
|
||||||
elif self.handle.is_paused() and self.handle.is_auto_managed() and not component.get("Core").session.is_paused():
|
|
||||||
self.state = "Queued"
|
self.state = "Queued"
|
||||||
elif component.get("Core").session.is_paused() or (self.handle.is_paused() and not self.handle.is_auto_managed()):
|
elif component.get("Core").session.is_paused() or (self.handle.is_paused() and not self.handle.is_auto_managed()):
|
||||||
self.state = "Paused"
|
self.state = "Paused"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue