From 252e75ffcbcafc2e7e32d0e71f0d7a3c478cf6ba Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 2 Feb 2015 16:36:49 +0100 Subject: [UploadedTo] Improve apiInfo (2) --- module/plugins/accounts/UploadedTo.py | 4 +++- module/plugins/hoster/UploadedTo.py | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py index 1b6df97fb..4e5c8035b 100644 --- a/module/plugins/accounts/UploadedTo.py +++ b/module/plugins/accounts/UploadedTo.py @@ -55,7 +55,9 @@ class UploadedTo(Account): else: trafficleft = self.parseTraffic(size + unit) - return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} + return {'validuntil' : validuntil, + 'trafficleft': trafficleft, + 'premium' : premium} def login(self, user, data, req): diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 0022fc94f..42ad3e06d 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UploadedTo(SimpleHoster): __name__ = "UploadedTo" __type__ = "hoster" - __version__ = "0.81" + __version__ = "0.82" __pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P\w+)' @@ -42,10 +42,10 @@ class UploadedTo(SimpleHoster): if html != "can't find request": api = html.split(",", 4) - if api[0] == "offline": - info['status'] = 1 - else: + if api[0] == "online": info.update({'name': api[4], 'size': api[2], 'status': 2}) + else: + info['status'] = 1 break else: sleep(3) -- cgit v1.2.3