summaryrefslogtreecommitdiffstats
path: root/deluge/core/torrentmanager.py
diff options
context:
space:
mode:
Diffstat (limited to 'deluge/core/torrentmanager.py')
-rw-r--r--deluge/core/torrentmanager.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py
index 1572f9a89..d4a548a4f 100644
--- a/deluge/core/torrentmanager.py
+++ b/deluge/core/torrentmanager.py
@@ -77,6 +77,7 @@ class TorrentState:
queue=None,
auto_managed=True,
is_finished=False,
+ error_statusmsg=None,
stop_ratio=2.00,
stop_at_ratio=False,
remove_at_ratio=False,
@@ -91,6 +92,7 @@ class TorrentState:
self.trackers = trackers
self.queue = queue
self.is_finished = is_finished
+ self.error_statusmsg = error_statusmsg
self.magnet = magnet
self.time_added = time_added
@@ -111,6 +113,7 @@ class TorrentState:
self.move_completed = move_completed
self.move_completed_path = move_completed_path
+
class TorrentManagerState:
def __init__(self):
self.torrents = []
@@ -672,7 +675,7 @@ class TorrentManager(component.Component):
# Create the state for each Torrent and append to the list
for torrent in self.torrents.values():
paused = False
- if torrent.state == "Paused":
+ if torrent.state in ["Paused", "Error"]:
paused = True
torrent_state = TorrentState(
@@ -692,6 +695,7 @@ class TorrentManager(component.Component):
torrent.get_queue_position(),
torrent.options["auto_managed"],
torrent.is_finished,
+ torrent.error_statusmsg,
torrent.options["stop_ratio"],
torrent.options["stop_at_ratio"],
torrent.options["remove_at_ratio"],