summaryrefslogtreecommitdiffstats
path: root/module/HookManager.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-22 20:04:29 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-22 20:04:29 +0100
commit0de6e675bb0c5a4adb79d16df55ada3071825ad5 (patch)
tree9ff782ba4c41873c8c7d06b239166d8a0806b335 /module/HookManager.py
parentRevert plugins to stable (diff)
downloadpyload-0de6e675bb0c5a4adb79d16df55ada3071825ad5.tar.xz
Revert remaining modules
Diffstat (limited to 'module/HookManager.py')
-rw-r--r--module/HookManager.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/module/HookManager.py b/module/HookManager.py
index e4b9a33a0..16f692d76 100644
--- a/module/HookManager.py
+++ b/module/HookManager.py
@@ -141,8 +141,8 @@ class HookManager:
if self.core.debug:
traceback.print_exc()
- self.log.info(_("Activated addons: %s") % ", ".join(sorted(active)))
- self.log.info(_("Deactivated addons: %s") % ", ".join(sorted(deactive)))
+ self.log.info(_("Activated plugins: %s") % ", ".join(sorted(active)))
+ self.log.info(_("Deactivate plugins: %s") % ", ".join(sorted(deactive)))
self.plugins = plugins
@@ -219,7 +219,10 @@ class HookManager:
def downloadFinished(self, pyfile):
for plugin in self.plugins:
if plugin.isActivated():
- plugin.downloadFinished(pyfile)
+ if "downloadFinished" in plugin.__threaded__:
+ self.startThread(plugin.downloadFinished, pyfile)
+ else:
+ plugin.downloadFinished(pyfile)
self.dispatchEvent("downloadFinished", pyfile)
@@ -228,7 +231,10 @@ class HookManager:
def downloadFailed(self, pyfile):
for plugin in self.plugins:
if plugin.isActivated():
- plugin.downloadFailed(pyfile)
+ if "downloadFailed" in plugin.__threaded__:
+ self.startThread(plugin.downloadFinished, pyfile)
+ else:
+ plugin.downloadFailed(pyfile)
self.dispatchEvent("downloadFailed", pyfile)
@@ -236,7 +242,10 @@ class HookManager:
def packageFinished(self, package):
for plugin in self.plugins:
if plugin.isActivated():
- plugin.packageFinished(package)
+ if "packageFinished" in plugin.__threaded__:
+ self.startThread(plugin.packageFinished, package)
+ else:
+ plugin.packageFinished(package)
self.dispatchEvent("packageFinished", package)