diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2014-01-18 21:01:07 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2014-01-18 21:01:07 +0100 |
commit | c5bce87d93de4ef981a411700e26c833f60d4786 (patch) | |
tree | 06391f61c26095697cfb8698de593c62469c637c | |
parent | additional fix #6 (diff) | |
download | pyload-c5bce87d93de4ef981a411700e26c833f60d4786.tar.xz |
additional fix #5
-rw-r--r-- | pyload/DownloadManager.py | 1 | ||||
-rw-r--r-- | pyload/threads/DecrypterThread.py | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/pyload/DownloadManager.py b/pyload/DownloadManager.py index e5354d84c..2d12088b5 100644 --- a/pyload/DownloadManager.py +++ b/pyload/DownloadManager.py @@ -98,6 +98,7 @@ class DownloadManager: @lock def startDecrypterThread(self, info): """ Start decrypting of entered data, all links in one package are accumulated to one thread.""" + self.core.files.setDownloadStatus(info.fid, DS.Decrypting) self.decrypter.append(DecrypterThread(self, [(info.download.url, info.download.plugin)], info.fid, info.package, info.owner)) diff --git a/pyload/threads/DecrypterThread.py b/pyload/threads/DecrypterThread.py index b90e67665..257caa2ef 100644 --- a/pyload/threads/DecrypterThread.py +++ b/pyload/threads/DecrypterThread.py @@ -32,17 +32,18 @@ class DecrypterThread(BaseThread): def run(self): pack = self.m.core.files.getPackage(self.pid) + api = self.core.api.withUserContext(self.owner) links, packages = self.decrypt(accumulate(self.data), pack.password) if links: self.log.info( _("Decrypted %(count)d links into package %(name)s") % {"count": len(links), "name": pack.name}) - self.m.core.api.addLinks(self.pid, [l.url for l in links]) + api.addLinks(self.pid, [l.url for l in links]) # TODO: add single package into this one and rename it? # TODO: nested packages for p in packages: - self.m.core.api.addPackage(p.name, p.getURLs(), pack.password) + api.addPackage(p.name, p.getURLs(), pack.password) self.m.core.files.setDownloadStatus(self.fid, DS.Finished if not self.error else DS.Failed) self.m.done(self) |