summaryrefslogtreecommitdiffstats
path: root/pyload/manager
diff options
context:
space:
mode:
authorGravatar Armin <Armin@Armin-PC.diedering.lan> 2015-04-13 23:39:24 +0200
committerGravatar Armin <Armin@Armin-PC.diedering.lan> 2015-04-13 23:39:24 +0200
commit93e8d96a612249bc5f6985740335306969b1a6d3 (patch)
treef89a3b6038344aad70a8abdd178af6af89c9a5a3 /pyload/manager
parentCleanup (2) (diff)
downloadpyload-93e8d96a612249bc5f6985740335306969b1a6d3.tar.xz
fix: assignJob
fix: typos __name vs. __name__
Diffstat (limited to 'pyload/manager')
-rw-r--r--pyload/manager/Plugin.py2
-rw-r--r--pyload/manager/Thread.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/pyload/manager/Plugin.py b/pyload/manager/Plugin.py
index 10abbc2ea..69a77fdf8 100644
--- a/pyload/manager/Plugin.py
+++ b/pyload/manager/Plugin.py
@@ -365,7 +365,7 @@ class PluginManager(object):
for type in as_dict.iterkeys():
if type in ("addon", "internal"): # : do not reload them because would cause to much side effects
- self.core.log.debug("Skipping reload for plugin: [%(type)s] %(name)s" % {'name': plugin, 'type': type})
+ self.core.log.debug("Skipping reload for plugins from type: %(type)s" % {'type': type})
continue
for plugin in as_dict[type]:
diff --git a/pyload/manager/Thread.py b/pyload/manager/Thread.py
index 147dff31f..dd1582eb7 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.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: (x[0], x[1], len([y for y in self.threads if y.active and y.active.pluginname == x[0]])), inuse)
+ 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)
onlimit = [x[0] for x in inuse if x[1] > 0 and x[2] >= x[1]]
- occ = [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 x.active.hasPlugin() and not x.active.plugin.multiDL] + onlimit
occ.sort()
occ = tuple(set(occ))
@@ -277,7 +277,7 @@ class ThreadManager(object):
job.release()
return
- if job.plugin.grtPluginType() == "hoster":
+ if job.plugin.getPluginType() == "hoster":
spaceLeft = freeSpace(self.core.config["general"]["download_folder"]) / 1024 / 1024
if spaceLeft < self.core.config["general"]["min_free_space"]:
self.core.log.warning(_("Not enough space left on device"))