diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2014-01-20 19:32:44 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2014-01-20 19:32:44 +0100 |
commit | 27c1654d4f5889ec9c634537e32018b4a52eed52 (patch) | |
tree | 9437d5a563821597cb85bb6fa14c494f08bc100f /pyload/api/DownloadApi.py | |
parent | fixed py 2.5 incompatibility (diff) | |
download | pyload-27c1654d4f5889ec9c634537e32018b4a52eed52.tar.xz |
fixed new waiting dl rule
Diffstat (limited to 'pyload/api/DownloadApi.py')
-rw-r--r-- | pyload/api/DownloadApi.py | 6 |
1 files changed, 4 insertions, 2 deletions
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() |