diff options
author | Sahil Shekhawat <sahilshekhawat01@gmail.com> | 2015-01-05 19:31:35 +0100 |
---|---|---|
committer | Sahil Shekhawat <sahilshekhawat01@gmail.com> | 2015-01-05 19:31:35 +0100 |
commit | 7b8593899e3d37846fb3ed94d47d9daba13a02d7 (patch) | |
tree | 5427650c3dd14b0c2878a1081be3709458bf48db /module/plugins/hooks/RPNetBiz.py | |
parent | Created plugin for Nitroflare.com (diff) | |
parent | Spare code improvements (diff) | |
download | pyload-7b8593899e3d37846fb3ed94d47d9daba13a02d7.tar.xz |
Merge branch 'stable' of https://github.com/pyload/pyload into stable
Diffstat (limited to 'module/plugins/hooks/RPNetBiz.py')
-rw-r--r-- | module/plugins/hooks/RPNetBiz.py | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/module/plugins/hooks/RPNetBiz.py b/module/plugins/hooks/RPNetBiz.py index bbbe8e128..9c88e6c01 100644 --- a/module/plugins/hooks/RPNetBiz.py +++ b/module/plugins/hooks/RPNetBiz.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHook import MultiHook class RPNetBiz(MultiHook): __name__ = "RPNetBiz" __type__ = "hook" - __version__ = "0.12" + __version__ = "0.13" __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), ("pluginlist", "str", "Hoster list (comma separated)", ""), @@ -20,12 +20,8 @@ class RPNetBiz(MultiHook): def getHosters(self): - # No hosts supported if no account - if not self.account or not self.account.canUse(): - return [] - # Get account data - (user, data) = self.account.selectAccount() + user, data = self.account.selectAccount() res = self.getURL("https://premium.rpnet.biz/client_api.php", get={'username': user, 'password': data['password'], 'action': "showHosterList"}) @@ -37,15 +33,3 @@ class RPNetBiz(MultiHook): # Extract hosters from json file return hoster_list['hosters'] - - - def coreReady(self): - # Get account plugin and check if there is a valid account available - self.account = self.core.accountManager.getAccountPlugin("RPNetBiz") - if not self.account.canUse(): - self.account = None - self.logError(_("Please enter your %s account or deactivate this plugin") % "rpnet") - return - - # Run the overwriten core ready which actually enables the multihoster hook - return MultiHook.coreReady(self) |