diff options
author | 2014-01-20 19:32:44 +0100 | |
---|---|---|
committer | 2014-01-20 19:32:44 +0100 | |
commit | 27c1654d4f5889ec9c634537e32018b4a52eed52 (patch) | |
tree | 9437d5a563821597cb85bb6fa14c494f08bc100f /pyload/DownloadManager.py | |
parent | fixed py 2.5 incompatibility (diff) | |
download | pyload-27c1654d4f5889ec9c634537e32018b4a52eed52.tar.xz |
fixed new waiting dl rule
Diffstat (limited to 'pyload/DownloadManager.py')
-rw-r--r-- | pyload/DownloadManager.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/pyload/DownloadManager.py b/pyload/DownloadManager.py index f014ab776..abb61a4fd 100644 --- a/pyload/DownloadManager.py +++ b/pyload/DownloadManager.py @@ -126,16 +126,11 @@ class DownloadManager: """get a id list of all pyfiles processed""" return [x.fid for x in self.activeDownloads(None)] - @read_lock - def abort(self): - """ Cancels all downloads """ - # TODO: may dead lock - for t in self.working: - t.active.abortDownload() @read_lock def shutdown(self): """ End all threads """ + self.paused = True for thread in self.working + self.free: thread.put("quit") @@ -168,7 +163,7 @@ class DownloadManager: # check for waiting dl rule if limit <= 0: # increase limit if there are waiting downloads - limit += min(self.waitingDownloads(), self.core.config['download']['wait_downloads'] + + limit += min(len(self.waitingDownloads()), self.core.config['download']['wait_downloads'] + self.core.config['download']['max_downloads'] - len( self.activeDownloads())) |