diff options
Diffstat (limited to 'module/plugins/accounts/RapidgatorNet.py')
-rw-r--r-- | module/plugins/accounts/RapidgatorNet.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py index c14490dd5..c17765e12 100644 --- a/module/plugins/accounts/RapidgatorNet.py +++ b/module/plugins/accounts/RapidgatorNet.py @@ -7,7 +7,7 @@ from module.common.json_layer import json_loads class RapidgatorNet(Account): __name__ = "RapidgatorNet" __type__ = "account" - __version__ = "0.10" + __version__ = "0.11" __description__ = """Rapidgator.net account plugin""" __license__ = "GPLv3" @@ -17,34 +17,34 @@ class RapidgatorNet(Account): API_URL = "http://rapidgator.net/api/user" - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): validuntil = None trafficleft = None premium = False sid = None try: - sid = self.getAccountData(user).get('sid', None) + sid = self.get_account_data(user).get('sid', None) assert sid html = self.load("%s/info" % self.API_URL, get={'sid': sid}, req=req) - self.logDebug("API:USERINFO", html) + self.log_debug("API:USERINFO", html) json = json_loads(html) if json['response_status'] == 200: if "reset_in" in json['response']: - self.scheduleRefresh(user, json['response']['reset_in']) + self.schedule_refresh(user, json['response']['reset_in']) validuntil = json['response']['expire_date'] trafficleft = float(json['response']['traffic_left']) / 1024 #@TODO: Remove `/ 1024` in 0.4.10 premium = True else: - self.logError(json['response_details']) + self.log_error(json['response_details']) except Exception, e: - self.logError(e) + self.log_error(e) return {'validuntil' : validuntil, 'trafficleft': trafficleft, @@ -56,7 +56,7 @@ class RapidgatorNet(Account): try: html = self.load('%s/login' % self.API_URL, post={"username": user, "password": data['password']}, req=req) - self.logDebug("API:LOGIN", html) + self.log_debug("API:LOGIN", html) json = json_loads(html) @@ -64,9 +64,9 @@ class RapidgatorNet(Account): data['sid'] = str(json['response']['session_id']) return else: - self.logError(json['response_details']) + self.log_error(json['response_details']) except Exception, e: - self.logError(e) + self.log_error(e) - self.wrongPassword() + self.wrong_password() |