diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-11-08 00:11:01 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-11-08 00:11:01 +0100 |
commit | 6d25e66a5f677cc1b06df662f1b12c7b5ab70d18 (patch) | |
tree | 000d9729f4849e7a0ac158eca87a09e71b41de4f /module | |
parent | [UpleaCom] Update patterns (diff) | |
download | pyload-6d25e66a5f677cc1b06df662f1b12c7b5ab70d18.tar.xz |
[RapidgatorNet] Fix prepare routine
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hoster/RapidgatorNet.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index b45543435..61141416a 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -14,7 +14,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class RapidgatorNet(SimpleHoster): __name__ = "RapidgatorNet" __type__ = "hoster" - __version__ = "0.24" + __version__ = "0.25" __pattern__ = r'http://(?:www\.)?(rapidgator\.net|rg\.to)/file/\w+' @@ -44,18 +44,17 @@ class RapidgatorNet(SimpleHoster): def setup(self): - self.resumeDownload = self.multiDL = self.premium - self.sid = None - self.chunkLimit = 1 - - - def prepare(self): if self.account: self.sid = self.account.getAccountData(self.user).get('SID', None) + else: + self.sid = None if self.sid: self.premium = True + self.resumeDownload = self.multiDL = self.premium + self.chunkLimit = 1 + def api_response(self, cmd): try: @@ -66,6 +65,7 @@ class RapidgatorNet(SimpleHoster): json = json_loads(json) status = json['response_status'] msg = json['response_details'] + except BadHeader, e: self.logError("API: %s" % cmd, str(e), "SID: %s" % self.sid) status = e.code @@ -73,9 +73,11 @@ class RapidgatorNet(SimpleHoster): if status == 200: return json['response'] + elif status == 423: self.account.empty(self.user) self.retry() + else: self.account.relogin(self.user) self.retry(wait_time=60) |