diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-20 09:52:57 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-20 09:52:57 +0100 |
commit | 0d77eac8e411b2467df343a6dd6e0fa932d80864 (patch) | |
tree | f3ec8c37fee20ee7222f2aa421e7583c22ef0dee /module | |
parent | fix threadmanager limitdl, add zevera.com (diff) | |
download | pyload-0d77eac8e411b2467df343a6dd6e0fa932d80864.tar.xz |
little threadmanager fix
Diffstat (limited to 'module')
-rw-r--r-- | module/threads/ThreadManager.py | 6 |
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: |