diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-04 20:23:01 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-04 20:23:01 +0100 |
commit | 003c1ce55e7ac0765236d3210b8081bfc5fddb2d (patch) | |
tree | 8020d4311336dadf423ad4bab1797c2bc04d7417 | |
parent | [SimpleHoster] Improve checkTrafficLeft routine (diff) | |
download | pyload-003c1ce55e7ac0765236d3210b8081bfc5fddb2d.tar.xz |
[MultiHook] Better account check
-rw-r--r-- | module/plugins/internal/MultiHook.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/module/plugins/internal/MultiHook.py b/module/plugins/internal/MultiHook.py index b5ac132b7..ea9f32673 100644 --- a/module/plugins/internal/MultiHook.py +++ b/module/plugins/internal/MultiHook.py @@ -9,7 +9,7 @@ from module.utils import remove_chars class MultiHook(Hook): __name__ = "MultiHook" __type__ = "hook" - __version__ = "0.28" + __version__ = "0.29" __config__ = [("mode" , "all;listed;unlisted", "Use for plugins (if supported)" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)" , "" ), @@ -43,6 +43,7 @@ class MultiHook(Hook): def setup(self): + self.account = None self.type = self.core.pluginManager.findPlugin(self.__name__)[1] or "hoster" self.plugins = [] self.supported = [] @@ -51,7 +52,12 @@ class MultiHook(Hook): def coreReady(self): self.account = self.core.accountManager.getAccountPlugin(self.__name__) + + if self.account and not self.account.canUse(): + self.account = None + if not self.account: + self.logWarning("MultiHook will be deactivated due missing account reference") self.setConfig('activated', False) |