summaryrefslogtreecommitdiffstats
path: root/pyload/api/DownloadApi.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2014-01-20 19:32:44 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2014-01-20 19:32:44 +0100
commit27c1654d4f5889ec9c634537e32018b4a52eed52 (patch)
tree9437d5a563821597cb85bb6fa14c494f08bc100f /pyload/api/DownloadApi.py
parentfixed py 2.5 incompatibility (diff)
downloadpyload-27c1654d4f5889ec9c634537e32018b4a52eed52.tar.xz
fixed new waiting dl rule
Diffstat (limited to 'pyload/api/DownloadApi.py')
-rw-r--r--pyload/api/DownloadApi.py6
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()