summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2014-01-18 22:37:30 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2014-01-18 22:37:30 +0100
commit40f519ce7b178a8a095db7d63f4685b75de14e7f (patch)
treeee67311c1376ca1ab8faef987d25e64f24bfe6f0
parentbasically working multi-user mode (diff)
downloadpyload-40f519ce7b178a8a095db7d63f4685b75de14e7f.tar.xz
better log message
-rw-r--r--pyload/threads/DecrypterThread.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/pyload/threads/DecrypterThread.py b/pyload/threads/DecrypterThread.py
index 1248e4733..9b26e468d 100644
--- a/pyload/threads/DecrypterThread.py
+++ b/pyload/threads/DecrypterThread.py
@@ -35,18 +35,19 @@ class DecrypterThread(BaseThread):
api = self.core.api.withUserContext(self.owner)
links, packages = self.decrypt(accumulate(self.data), pack.password)
+ # if there is only one package links will be added to current one
+ if len(packages) == 1:
+ # TODO: also rename the package (optionally)
+ links.extend(packages[0].links)
+ del packages[0]
+
if links:
self.log.info(
_("Decrypted %(count)d links into package %(name)s") % {"count": len(links), "name": pack.name})
api.addLinks(self.pid, [l.url for l in links])
- # if there is only one package links will be added to current one
- if len(packages) == 1:
- # TODO: also rename the package (optionally)
- api.addLinks(self.pid, packages[0].getURLs())
- else:
- for p in packages:
- api.addPackage(p.name, p.getURLs(), pack.password)
+ for p in packages:
+ api.addPackage(p.name, p.getURLs(), pack.password)
self.core.files.setDownloadStatus(self.fid, DS.Finished if not self.error else DS.Failed)
self.m.done(self)