diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-04 20:26:13 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-04 20:26:13 +0100 |
commit | 7979d0833573a107baae8c45330b8b5874630a76 (patch) | |
tree | eaa2c71065c33067de56bdd8763e9ef3d690263f /module/plugins/hooks/RehostTo.py | |
parent | [PremiumTo] CHECK_TRAFFIC (diff) | |
download | pyload-7979d0833573a107baae8c45330b8b5874630a76.tar.xz |
Spare code improvements
Diffstat (limited to 'module/plugins/hooks/RehostTo.py')
-rw-r--r-- | module/plugins/hooks/RehostTo.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/module/plugins/hooks/RehostTo.py b/module/plugins/hooks/RehostTo.py index c3b626bf7..527770eb6 100644 --- a/module/plugins/hooks/RehostTo.py +++ b/module/plugins/hooks/RehostTo.py @@ -6,7 +6,7 @@ from module.plugins.internal.MultiHook import MultiHook class RehostTo(MultiHook): __name__ = "RehostTo" __type__ = "hook" - __version__ = "0.45" + __version__ = "0.46" __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("pluginlist", "str", "Hoster list (comma separated)", ""), @@ -25,16 +25,9 @@ class RehostTo(MultiHook): def coreReady(self): - self.account = self.core.accountManager.getAccountPlugin("RehostTo") + super(RehostTo, self).coreReady() - user = self.account.selectAccount()[0] + user, data = self.account.selectAccount() - if not user: - self.logError(_("Please add your rehost.to account first and restart pyLoad")) - return - - data = self.account.getAccountInfo(user) - self.ses = data['ses'] + self.ses = data['ses'] self.long_ses = data['long_ses'] - - return MultiHook.coreReady(self) |