diff options
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() |