From c02a81a7bdee7628942d43add75b0a2131c87ba9 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 18 Jan 2014 20:27:03 +0100 Subject: additional fix #3 --- pyload/DownloadManager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pyload/DownloadManager.py') diff --git a/pyload/DownloadManager.py b/pyload/DownloadManager.py index 6345f9519..452be93e1 100644 --- a/pyload/DownloadManager.py +++ b/pyload/DownloadManager.py @@ -63,11 +63,13 @@ class DownloadManager: @lock def done(self, thread): """ Switch thread from working to free state """ - self.working.remove(thread) # only download threads will be re-used if isinstance(thread, DownloadThread): + self.working.remove(thread) self.free.append(thread) thread.isWorking.clear() + elif isinstance(thread, DecrypterThread): + self.decrypter.remove(thread) @lock def stop(self, thread): @@ -96,7 +98,8 @@ class DownloadManager: @lock def startDecrypterThread(self, info): """ Start decrypting of entered data, all links in one package are accumulated to one thread.""" - self.decrypter.append(DecrypterThread(self, [(info.download.plugin, info.download.url)], info.package)) + self.decrypter.append(DecrypterThread(self, [(info.download.plugin, info.download.url)], + info.fid, info.package, info.owner)) @read_lock def activeDownloads(self, uid=None): -- cgit v1.2.3