mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-07 00:48:41 +00:00
Use torrent state name instead of number if available
This commit is contained in:
parent
504751424f
commit
3cd30ea96a
1 changed files with 14 additions and 12 deletions
|
@ -341,6 +341,9 @@ class Torrent(object):
|
|||
|
||||
# Set self.state to the ltstate right away just incase we don't hit some
|
||||
# of the logic below
|
||||
if ltstate in LTSTATE:
|
||||
self.state = LTSTATE[ltstate]
|
||||
else:
|
||||
self.state = str(ltstate)
|
||||
|
||||
log.debug("set_state_based_on_ltstate: %s", deluge.common.LT_TORRENT_STATE[ltstate])
|
||||
|
@ -899,4 +902,3 @@ class Torrent(object):
|
|||
for key in self.prev_status.keys():
|
||||
if not self.rpcserver.is_session_valid(key):
|
||||
del self.prev_status[key]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue