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 /pyload/threads | |
parent | additional fix #6 (diff) | |
download | pyload-c5bce87d93de4ef981a411700e26c833f60d4786.tar.xz |
additional fix #5
Diffstat (limited to 'pyload/threads')
-rw-r--r-- | pyload/threads/DecrypterThread.py | 5 |
1 files changed, 3 insertions, 2 deletions
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) |