From 7b8c458cca7d21a029620f98e453f746fce69cd1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 16:10:01 +0200 Subject: Prefer single quote for dict key name --- module/plugins/accounts/ZeveraCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/ZeveraCom.py') diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index 1eb90801a..74383ec22 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -27,7 +27,7 @@ class ZeveraCom(Account): def login(self, user, data, req): self.loginname = user - self.password = data["password"] + self.password = data['password'] if self.getAPIData(req) == "No traffic": self.wrongPassword() -- cgit v1.2.3 From 8e47b0de30a25d0fd5dfb518bfe4e1e7beff93fd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:27:44 +0200 Subject: Key attributes cleanup for account, container and crypter plugins --- module/plugins/accounts/ZeveraCom.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/accounts/ZeveraCom.py') diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index 74383ec22..11a224039 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -9,10 +9,12 @@ class ZeveraCom(Account): __name__ = "ZeveraCom" __version__ = "0.21" __type__ = "account" + __description__ = """Zevera.com account plugin""" __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" + def loadAccountInfo(self, user, req): data = self.getAPIData(req) if data == "No traffic": -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/accounts/ZeveraCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/ZeveraCom.py') diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index 11a224039..db1ebd4ae 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -7,8 +7,8 @@ from module.plugins.Account import Account class ZeveraCom(Account): __name__ = "ZeveraCom" - __version__ = "0.21" __type__ = "account" + __version__ = "0.21" __description__ = """Zevera.com account plugin""" __author_name__ = "zoidberg" -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/accounts/ZeveraCom.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/accounts/ZeveraCom.py') diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index db1ebd4ae..83015079b 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -11,8 +11,7 @@ class ZeveraCom(Account): __version__ = "0.21" __description__ = """Zevera.com account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] def loadAccountInfo(self, user, req): -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/accounts/ZeveraCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/ZeveraCom.py') diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index 83015079b..72c6c7348 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -11,6 +11,7 @@ class ZeveraCom(Account): __version__ = "0.21" __description__ = """Zevera.com account plugin""" + __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] -- cgit v1.2.3 From 6a0fb7fdd4ea2749be44625225d8a235a78f032f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:42:39 +0200 Subject: [accounts] Code cosmetics --- module/plugins/accounts/ZeveraCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/ZeveraCom.py') diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index 72c6c7348..7e4fb0ab8 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -27,6 +27,7 @@ class ZeveraCom(Account): } return account_info + def login(self, user, data, req): self.loginname = user self.password = data['password'] -- cgit v1.2.3 From 0eb6e7ec4a1144dcca824d8add049787d3da1762 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:44:59 +0200 Subject: Two space before function declaration --- module/plugins/accounts/ZeveraCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/ZeveraCom.py') diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index 7e4fb0ab8..8ee8610ba 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -34,6 +34,7 @@ class ZeveraCom(Account): if self.getAPIData(req) == "No traffic": self.wrongPassword() + def getAPIData(self, req, just_header=False, **kwargs): get_data = { 'cmd': 'accountinfo', -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/accounts/ZeveraCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/ZeveraCom.py') diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index 8ee8610ba..01f9ef692 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -6,13 +6,13 @@ from module.plugins.Account import Account class ZeveraCom(Account): - __name__ = "ZeveraCom" - __type__ = "account" + __name__ = "ZeveraCom" + __type__ = "account" __version__ = "0.21" __description__ = """Zevera.com account plugin""" - __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + __license__ = "GPLv3" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] def loadAccountInfo(self, user, req): -- cgit v1.2.3 From c9e31d875d32de31e54959b82bc35eff2b3e0f3f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 10 Nov 2014 00:19:51 +0100 Subject: Code cosmetics --- module/plugins/accounts/ZeveraCom.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/accounts/ZeveraCom.py') diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index 01f9ef692..dbec6984d 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -43,14 +43,14 @@ class ZeveraCom(Account): } get_data.update(kwargs) - response = req.load("http://www.zevera.com/jDownloader.ashx", get=get_data, + res = req.load("http://www.zevera.com/jDownloader.ashx", get=get_data, decode=True, just_header=just_header) - self.logDebug(response) + self.logDebug(res) - if ':' in response: + if ':' in res: if not just_header: - response = response.replace(',', '\n') + res = res.replace(',', '\n') return dict((y.strip().lower(), z.strip()) for (y, z) in - [x.split(':', 1) for x in response.splitlines() if ':' in x]) + [x.split(':', 1) for x in res.splitlines() if ':' in x]) else: - return response + return res -- cgit v1.2.3 From fb65d5354c3cc80c3f48c3a2745b8dc01105edfd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 18 Dec 2014 16:02:29 +0100 Subject: Update account plugins --- module/plugins/accounts/ZeveraCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/ZeveraCom.py') diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index dbec6984d..e8e3431e3 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -8,7 +8,7 @@ from module.plugins.Account import Account class ZeveraCom(Account): __name__ = "ZeveraCom" __type__ = "account" - __version__ = "0.21" + __version__ = "0.22" __description__ = """Zevera.com account plugin""" __license__ = "GPLv3" @@ -21,7 +21,7 @@ class ZeveraCom(Account): account_info = {"trafficleft": 0, "validuntil": 0, "premium": False} else: account_info = { - "trafficleft": int(data['availabletodaytraffic']) * 1024, + "trafficleft": float(data['availabletodaytraffic']) * 1024, "validuntil": mktime(strptime(data['endsubscriptiondate'], "%Y/%m/%d %H:%M:%S")), "premium": True } -- cgit v1.2.3