summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-20 09:52:57 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-20 09:52:57 +0100
commit0d77eac8e411b2467df343a6dd6e0fa932d80864 (patch)
treef3ec8c37fee20ee7222f2aa421e7583c22ef0dee
parentfix threadmanager limitdl, add zevera.com (diff)
downloadpyload-0d77eac8e411b2467df343a6dd6e0fa932d80864.tar.xz
little threadmanager fix
-rw-r--r--module/threads/ThreadManager.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/threads/ThreadManager.py b/module/threads/ThreadManager.py
index a42d6df16..f8b5c0aba 100644
--- a/module/threads/ThreadManager.py
+++ b/module/threads/ThreadManager.py
@@ -264,9 +264,9 @@ class ThreadManager:
free = [x for x in self.threads if not x.active]
- inuse = uniqify([(x.active.pluginname, x.active.plugin.getDownloadLimit()) for x in self.threads if x.active and x.active.hasPlugin()])
- inuse = map(lambda x : (x[0], x[1], len([y for y in self.threads if y.active and y.active.pluginname == x[0]])) ,inuse)
- occ = tuple(sorted([x[0] for x in inuse if 0 < x[1] <= x[2]]))
+ inuse = [(x.active.pluginname, x.active.plugin.getDownloadLimit()) for x in self.threads if x.active and x.active.hasPlugin()]
+ inuse = [(x[0], x[1], len([y for y in self.threads if y.active and y.active.pluginname == x[0]])) for x in inuse]
+ occ = tuple(sorted(uniqify([x[0] for x in inuse if 0 < x[1] <= x[2]])))
job = self.core.files.getJob(occ)
if job: