diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-06 14:40:21 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-06 14:40:21 +0200 |
commit | 8606861d9a33674c3de4e1fe50c8d9727abaf6ac (patch) | |
tree | e477336504aad64b6e3b738af1f8b3befba6cfbf | |
parent | webif plugin config preparations (diff) | |
download | pyload-8606861d9a33674c3de4e1fe50c8d9727abaf6ac.tar.xz |
hook deactivating
-rw-r--r-- | module/HookManager.py | 6 | ||||
-rw-r--r-- | module/PluginThread.py | 4 | ||||
-rw-r--r-- | module/plugins/hooks/ClickAndLoad.py | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/module/HookManager.py b/module/HookManager.py index 1fd8a5844..b188de1a6 100644 --- a/module/HookManager.py +++ b/module/HookManager.py @@ -50,8 +50,10 @@ class HookManager(): #hookClass = getattr(plugin, plugin.__name__) #@TODO config parsing and deactivating plugin = pluginClass(self.core) - plugins.append(plugin) - self.log.info(_("%s activated") % pluginClass.__name__) + if plugin.isActivated(): + #@TODO better selection + plugins.append(plugin) + self.log.info(_("%s activated") % pluginClass.__name__) except: self.log.warning(_("Failed activating %(name)s") % {"name":pluginClass.__name__}) if self.core.debug: diff --git a/module/PluginThread.py b/module/PluginThread.py index 1adf15172..35ad796b3 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -118,6 +118,9 @@ class DownloadThread(PluginThread): code, msg = e print "pycurl error", code, msg + if self.m.core.debug: + print_exc() + self.active = False pyfile.release() continue @@ -125,6 +128,7 @@ class DownloadThread(PluginThread): except Exception, e: pyfile.setStatus("failed") self.m.log.error(_("Download failed: %s | %s") % (pyfile.name, str(e))) + pyfile.error = str(e) if self.m.core.debug: print_exc() diff --git a/module/plugins/hooks/ClickAndLoad.py b/module/plugins/hooks/ClickAndLoad.py index 536df64d5..d4d280618 100644 --- a/module/plugins/hooks/ClickAndLoad.py +++ b/module/plugins/hooks/ClickAndLoad.py @@ -27,6 +27,7 @@ class ClickAndLoad(Hook): __name__ = "ClickAndLoad" __version__ = "0.2" __description__ = """Gives abillity to use jd's click and load. depends on webinterface""" + __config__ = [ ("activated", "bool", "Activated" , "True") ] __author_name__ = ("RaNaN", "mkaay") __author_mail__ = ("RaNaN@pyload.de", "mkaay@mkaay.de") |