From 0c10deaa7805c12f62052d7701694dfd5d5c4dc2 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Tue, 12 Apr 2016 01:36:45 +0300 Subject: [RapidgatorNet] fix #2419 --- module/plugins/accounts/RapidgatorNet.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'module/plugins/accounts') diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py index 6ee13f37c..013250ae3 100644 --- a/module/plugins/accounts/RapidgatorNet.py +++ b/module/plugins/accounts/RapidgatorNet.py @@ -9,14 +9,17 @@ from module.plugins.internal.misc import json class RapidgatorNet(Account): __name__ = "RapidgatorNet" __type__ = "account" - __version__ = "0.19" + __version__ = "0.20" __status__ = "testing" __description__ = """Rapidgator.net account plugin""" __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + __authors__ = [("zoidberg", "zoidberg@mujmail.cz" ), + ("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")] + TUNE_TIMEOUT = False + API_URL = "http://rapidgator.net/api/user/" @@ -37,12 +40,10 @@ class RapidgatorNet(Account): json_data = json.loads(html) if json_data['response_status'] == 200: - if "reset_in" in json_data['response']: - self._schedule_refresh(user, json_data['response']['reset_in']) - validuntil = json_data['response']['expire_date'] trafficleft = float(json_data['response']['traffic_left']) / 1024 #@TODO: Remove `/ 1024` in 0.4.10 premium = True + else: self.log_error(json_data['response_details']) @@ -67,7 +68,9 @@ class RapidgatorNet(Account): if json_data['response_status'] == 200: data['sid'] = str(json_data['response']['session_id']) + self.timeout = float(json_data['response']['reset_in']) return + else: self.log_error(json_data['response_details']) -- cgit v1.2.3