From 27c1654d4f5889ec9c634537e32018b4a52eed52 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 20 Jan 2014 19:32:44 +0100 Subject: fixed new waiting dl rule --- pyload/api/DownloadApi.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pyload/api') diff --git a/pyload/api/DownloadApi.py b/pyload/api/DownloadApi.py index 71d112e44..299609e35 100644 --- a/pyload/api/DownloadApi.py +++ b/pyload/api/DownloadApi.py @@ -148,7 +148,9 @@ class DownloadApi(ApiComponent): @RequirePerm(Permission.Modify) def stopAllDownloads(self): """Aborts all running downloads.""" - self.core.dlm.abort() + for pyfile in self.core.files.cachedFiles(): + if self.hasAccess(pyfile): + pyfile.abortDownload() @RequirePerm(Permission.Modify) def stopDownloads(self, fids): @@ -159,7 +161,7 @@ class DownloadApi(ApiComponent): """ pyfiles = self.core.files.cachedFiles() for pyfile in pyfiles: - if pyfile.id in fids: + if pyfile.id in fids and self.hasAccess(pyfile): pyfile.abortDownload() -- cgit v1.2.3