From 3943cb7621189f1dc9cd2de77b318da513149803 Mon Sep 17 00:00:00 2001 From: Armin Date: Tue, 14 Apr 2015 17:55:37 +0200 Subject: fix typo --- pyload/manager/thread/Download.py | 1 + pyload/manager/thread/Plugin.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'pyload/manager') diff --git a/pyload/manager/thread/Download.py b/pyload/manager/thread/Download.py index fc76b655e..21db61ca4 100644 --- a/pyload/manager/thread/Download.py +++ b/pyload/manager/thread/Download.py @@ -39,6 +39,7 @@ class DownloadThread(PluginThread): while True: del pyfile + self.active = False # sets the thread inactive when it is ready to get next job self.active = self.queue.get() pyfile = self.active diff --git a/pyload/manager/thread/Plugin.py b/pyload/manager/thread/Plugin.py index 155e687d4..658ce4550 100644 --- a/pyload/manager/thread/Plugin.py +++ b/pyload/manager/thread/Plugin.py @@ -20,6 +20,7 @@ from pyload.utils.packagetools import parseNames from pyload.utils import fs_join from pyload.api import OnlineStatus + class PluginThread(Thread): """abstract base class for thread types""" @@ -127,5 +128,5 @@ class PluginThread(Thread): def clean(self, pyfile): """ set thread unactive and release pyfile """ - self.active = False + self.active = True #release pyfile but lets the thread active pyfile.release() -- cgit v1.2.3 From d7ced99ef511ce9f0a81e437db2f31fce8717b23 Mon Sep 17 00:00:00 2001 From: Armin Date: Thu, 16 Apr 2015 19:38:27 +0200 Subject: fixed: more typos --- pyload/manager/Thread.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pyload/manager') diff --git a/pyload/manager/Thread.py b/pyload/manager/Thread.py index dd1582eb7..fb302ef0a 100644 --- a/pyload/manager/Thread.py +++ b/pyload/manager/Thread.py @@ -257,11 +257,11 @@ class ThreadManager(object): free = [x for x in self.threads if not x.active] - inuse = set([((x.active.plugintype, x.active.pluginname), self.getLimit(x)) for x in self.threads if x.active and x.active.hasPlugin() and x.active.plugin.account]) - inuse = map(lambda x: ('.'.join(x[0]), x[1], len([y for y in self.threads if y.active and y.active.plugintype == x[0][0] and y.active.pluginname == x[0][1]])), inuse) + inuse = set([((x.active.plugintype, x.active.pluginname), self.getLimit(x)) for x in self.threads if x.active and isinstance(x.active, PyFile) and x.active.hasPlugin() and x.active.plugin.account]) + inuse = map(lambda x: ('.'.join(x[0]), x[1], len([y for y in self.threads if y.active and isinstance(y.active, PyFile) and y.active.plugintype == x[0][0] and y.active.pluginname == x[0][1]])), inuse) onlimit = [x[0] for x in inuse if x[1] > 0 and x[2] >= x[1]] - occ = [x.active.plugintype + '.' + x.active.pluginname for x in self.threads if x.active and x.active.hasPlugin() and not x.active.plugin.multiDL] + onlimit + occ = [x.active.plugintype + '.' + x.active.pluginname for x in self.threads if x.active and isinstance(x.active, PyFile) and x.active.hasPlugin() and not x.active.plugin.multiDL] + onlimit occ.sort() occ = tuple(set(occ)) -- cgit v1.2.3