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/MultiDebridCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/MultiDebridCom.py') diff --git a/module/plugins/accounts/MultiDebridCom.py b/module/plugins/accounts/MultiDebridCom.py index 704b4ac78..d38247051 100644 --- a/module/plugins/accounts/MultiDebridCom.py +++ b/module/plugins/accounts/MultiDebridCom.py @@ -38,7 +38,7 @@ class MultiDebridCom(Account): def login(self, user, data, req): # Password to use is the API-Password written in http://multi-debrid.com/myaccount self.html = req.load("http://multi-debrid.com/api.php", - get={"user": user, "pass": data["password"]}) + get={"user": user, "pass": data['password']}) self.logDebug('JSON data: ' + self.html) self.json_data = json_loads(self.html) if self.json_data['status'] != 'ok': -- 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/MultiDebridCom.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/accounts/MultiDebridCom.py') diff --git a/module/plugins/accounts/MultiDebridCom.py b/module/plugins/accounts/MultiDebridCom.py index d38247051..da8a2046a 100644 --- a/module/plugins/accounts/MultiDebridCom.py +++ b/module/plugins/accounts/MultiDebridCom.py @@ -24,10 +24,12 @@ class MultiDebridCom(Account): __name__ = "MultiDebridCom" __version__ = "0.01" __type__ = "account" + __description__ = """Multi-debrid.com account plugin""" __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" + def loadAccountInfo(self, user, req): if 'days_left' in self.json_data: validuntil = int(time() + self.json_data['days_left'] * 24 * 60 * 60) -- cgit v1.2.3 From 9762ac2fe94e3c6709fc46b6e9bde99e10cb3681 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 02:25:53 +0200 Subject: [account] self.html -> html (where was possible) --- module/plugins/accounts/MultiDebridCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/MultiDebridCom.py') diff --git a/module/plugins/accounts/MultiDebridCom.py b/module/plugins/accounts/MultiDebridCom.py index da8a2046a..405dc60ac 100644 --- a/module/plugins/accounts/MultiDebridCom.py +++ b/module/plugins/accounts/MultiDebridCom.py @@ -39,10 +39,10 @@ class MultiDebridCom(Account): def login(self, user, data, req): # Password to use is the API-Password written in http://multi-debrid.com/myaccount - self.html = req.load("http://multi-debrid.com/api.php", + html = req.load("http://multi-debrid.com/api.php", get={"user": user, "pass": data['password']}) - self.logDebug('JSON data: ' + self.html) - self.json_data = json_loads(self.html) + self.logDebug('JSON data: ' + html) + self.json_data = json_loads(html) if self.json_data['status'] != 'ok': self.logError('Invalid login. The password to use is the API-Password you find in your "My Account" page') self.wrongPassword() -- 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/MultiDebridCom.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'module/plugins/accounts/MultiDebridCom.py') diff --git a/module/plugins/accounts/MultiDebridCom.py b/module/plugins/accounts/MultiDebridCom.py index 405dc60ac..c731ce9ae 100644 --- a/module/plugins/accounts/MultiDebridCom.py +++ b/module/plugins/accounts/MultiDebridCom.py @@ -1,18 +1,4 @@ # -*- coding: utf-8 -*- -############################################################################ -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU Affero General Public License as # -# published by the Free Software Foundation, either version 3 of the # -# License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU Affero General Public License for more details. # -# # -# You should have received a copy of the GNU Affero General Public License # -# along with this program. If not, see . # -############################################################################ from time import time @@ -22,8 +8,8 @@ from module.common.json_layer import json_loads class MultiDebridCom(Account): __name__ = "MultiDebridCom" - __version__ = "0.01" __type__ = "account" + __version__ = "0.01" __description__ = """Multi-debrid.com account plugin""" __author_name__ = "stickell" -- cgit v1.2.3 From 22334b664ff2be7bbbe0627e4d65cf222bd29919 Mon Sep 17 00:00:00 2001 From: stickell Date: Thu, 11 Sep 2014 12:16:03 +0200 Subject: [MultiDebrid] renamed to Myfastline --- module/plugins/accounts/MultiDebridCom.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'module/plugins/accounts/MultiDebridCom.py') diff --git a/module/plugins/accounts/MultiDebridCom.py b/module/plugins/accounts/MultiDebridCom.py index c731ce9ae..2a2d6d065 100644 --- a/module/plugins/accounts/MultiDebridCom.py +++ b/module/plugins/accounts/MultiDebridCom.py @@ -9,13 +9,11 @@ from module.common.json_layer import json_loads class MultiDebridCom(Account): __name__ = "MultiDebridCom" __type__ = "account" - __version__ = "0.01" - - __description__ = """Multi-debrid.com account plugin""" + __version__ = "0.02" + __description__ = """Myfastfile.com account plugin""" __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" - def loadAccountInfo(self, user, req): if 'days_left' in self.json_data: validuntil = int(time() + self.json_data['days_left'] * 24 * 60 * 60) @@ -24,8 +22,8 @@ class MultiDebridCom(Account): self.logError('Unable to get account information') def login(self, user, data, req): - # Password to use is the API-Password written in http://multi-debrid.com/myaccount - html = req.load("http://multi-debrid.com/api.php", + # Password to use is the API-Password written in http://myfastfile.com/myaccount + html = req.load("http://myfastfile.com/api.php", get={"user": user, "pass": data['password']}) self.logDebug('JSON data: ' + html) self.json_data = json_loads(html) -- cgit v1.2.3 From 6f87a713970d6a18c0a3e622286488ec9e3b5494 Mon Sep 17 00:00:00 2001 From: stickell Date: Thu, 11 Sep 2014 15:52:16 +0200 Subject: [MultiDebrid] renaming files to MyfastlineCom --- module/plugins/accounts/MultiDebridCom.py | 32 ------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 module/plugins/accounts/MultiDebridCom.py (limited to 'module/plugins/accounts/MultiDebridCom.py') diff --git a/module/plugins/accounts/MultiDebridCom.py b/module/plugins/accounts/MultiDebridCom.py deleted file mode 100644 index 2a2d6d065..000000000 --- a/module/plugins/accounts/MultiDebridCom.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import time - -from module.plugins.Account import Account -from module.common.json_layer import json_loads - - -class MultiDebridCom(Account): - __name__ = "MultiDebridCom" - __type__ = "account" - __version__ = "0.02" - __description__ = """Myfastfile.com account plugin""" - __author_name__ = "stickell" - __author_mail__ = "l.stickell@yahoo.it" - - def loadAccountInfo(self, user, req): - if 'days_left' in self.json_data: - validuntil = int(time() + self.json_data['days_left'] * 24 * 60 * 60) - return {"premium": True, "validuntil": validuntil, "trafficleft": -1} - else: - self.logError('Unable to get account information') - - def login(self, user, data, req): - # Password to use is the API-Password written in http://myfastfile.com/myaccount - html = req.load("http://myfastfile.com/api.php", - get={"user": user, "pass": data['password']}) - self.logDebug('JSON data: ' + html) - self.json_data = json_loads(html) - if self.json_data['status'] != 'ok': - self.logError('Invalid login. The password to use is the API-Password you find in your "My Account" page') - self.wrongPassword() -- cgit v1.2.3