From 43460c40d00819535dfeecfdb80f8a608f2190fd Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 13 Oct 2011 15:25:32 +0200 Subject: improvement for hook plugins, new internal plugin type --- module/Api.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'module/Api.py') 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 -- cgit v1.2.3