summaryrefslogtreecommitdiffstats
path: root/module/Api.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-10-13 15:25:32 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-10-13 15:25:32 +0200
commit43460c40d00819535dfeecfdb80f8a608f2190fd (patch)
tree351518d8db3e5ee12689af4e019d5c3fc90bd212 /module/Api.py
parentpatches from #392 (diff)
downloadpyload-43460c40d00819535dfeecfdb80f8a608f2190fd.tar.xz
improvement for hook plugins, new internal plugin type
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