summaryrefslogtreecommitdiffstats
path: root/module/Api.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/Api.py')
-rw-r--r--module/Api.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/module/Api.py b/module/Api.py
index aad61cd5f..9aa6f86bb 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -286,15 +286,14 @@ class Api(Iface):
:return: list of `DownloadStatus`
"""
data = []
- for pyfile in [x.active for x in self.core.threadManager.threads + self.core.threadManager.localThreads if
- x.active]:
- if not isinstance(pyfile, PyFile) or not pyfile.hasPlugin():
+ for pyfile in self.core.threadManager.getActiveFiles():
+ if not isinstance(pyfile, PyFile):
continue
data.append(DownloadInfo(
pyfile.id, pyfile.name, pyfile.getSpeed(), pyfile.getETA(), pyfile.formatETA(),
pyfile.getBytesLeft(), pyfile.getSize(), pyfile.formatSize(), pyfile.getPercent(),
- pyfile.status, pyfile.m.statusMsg[pyfile.status], pyfile.formatWait(),
+ pyfile.status, pyfile.getStatusName(), pyfile.formatWait(),
pyfile.waitUntil, pyfile.packageid, pyfile.package().name, pyfile.pluginname))
return data