diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-11 17:55:35 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-13 13:38:12 +0200 |
commit | 6915dcdf8175c8cd903338eae2d40ffb44286f70 (patch) | |
tree | 340f2c60512d016297ed47d632672819f7b78026 /module | |
parent | Fixing fixurl... (diff) | |
download | pyload-6915dcdf8175c8cd903338eae2d40ffb44286f70.tar.xz |
Spare fixes
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/accounts/RapidgatorNet.py | 3 | ||||
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 28 | ||||
-rw-r--r-- | module/plugins/internal/XFSAccount.py | 7 |
3 files changed, 17 insertions, 21 deletions
diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py index ea6da4c4b..9c37f6212 100644 --- a/module/plugins/accounts/RapidgatorNet.py +++ b/module/plugins/accounts/RapidgatorNet.py @@ -9,7 +9,7 @@ from module.common.json_layer import json_loads class RapidgatorNet(Account): __name__ = "RapidgatorNet" __type__ = "account" - __version__ = "0.15" + __version__ = "0.16" __status__ = "testing" __description__ = """Rapidgator.net account plugin""" @@ -28,7 +28,6 @@ class RapidgatorNet(Account): try: sid = data.get('sid', None) - assert sid html = self.load(urlparse.urljoin(self.API_URL, "info"), get={'sid': sid}) diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 744a1f686..a4e01249e 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -158,10 +158,10 @@ class SimpleHoster(Hoster): pass if html: - if cls.OFFLINE_PATTERN and re.search(cls.OFFLINE_PATTERN, html): + if cls.OFFLINE_PATTERN and re.search(cls.OFFLINE_PATTERN, html) is not None: info['status'] = 1 - elif cls.TEMP_OFFLINE_PATTERN and re.search(cls.TEMP_OFFLINE_PATTERN, html): + elif cls.TEMP_OFFLINE_PATTERN and re.search(cls.TEMP_OFFLINE_PATTERN, html) is not None: info['status'] = 6 else: @@ -447,27 +447,21 @@ class SimpleHoster(Hoster): self.log_debug("File info: %s" % self.info) self.log_debug("Previous file info: %s" % old_info) - try: - url = self.info['url'] - name = self.info['name'] - - except KeyError: - pass + name = self.info.get('name') + size = self.info.get('size') + if name and name is not self.info.get('url'): + self.pyfile.name = name else: - if name and name is not url: - self.pyfile.name = name + name = self.pyfile.name - if self.info.get('size') > 0: + if size > 0: self.pyfile.size = int(self.info['size']) #@TODO: Fix int conversion in 0.4.10 - - # self.pyfile.sync() - - name = self.pyfile.name - size = self.pyfile.size + else: + size = self.pyfile.size self.log_info(_("File name: ") + name) - self.log_info(_("File size: %s bytes") % size if size > 0 else _("File size: Unknown")) + self.log_info(_("File size: %s bytes") % size or "N/D") #@TODO: Rewrite in 0.4.10 diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py index 5a6f0ee9c..e3290b5bb 100644 --- a/module/plugins/internal/XFSAccount.py +++ b/module/plugins/internal/XFSAccount.py @@ -12,7 +12,7 @@ from module.plugins.internal.Plugin import parse_html_form, parse_time, set_cook class XFSAccount(Account): __name__ = "XFSAccount" __type__ = "account" - __version__ = "0.52" + __version__ = "0.53" __status__ = "testing" __description__ = """XFileSharing account plugin""" @@ -207,7 +207,10 @@ class XFSAccount(Account): finally: errmsg = re.sub(r'<.*?>', " ", errmsg.strip()) - self.timeout = parse_time(errmsg) + new_timeout = parse_time(errmsg) + if new_timeout > self.timeout: + self.timeout = new_timeout + self.fail_login(errmsg) m = re.search(self.LOGIN_FAIL_PATTERN, self.html) |