From 97d25752691aa561c29a91166fdd30302bef2db2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 00:54:03 +0200 Subject: [Account] parse_info -> grab_info --- module/plugins/accounts/SmoozedCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/SmoozedCom.py') diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py index 9c2451794..6ac1e9744 100644 --- a/module/plugins/accounts/SmoozedCom.py +++ b/module/plugins/accounts/SmoozedCom.py @@ -34,7 +34,7 @@ class SmoozedCom(Account): __authors__ = [("", "")] - def parse_info(self, user, password, data, req): + def grab_info(self, user, password, data, req): status = self.get_account_status(user, password, req) self.log_debug(status) @@ -67,7 +67,7 @@ class SmoozedCom(Account): #: Check if user and password are valid if status['state'] != 'ok': - self.login_fail() + self.fail_login() def get_account_status(self, user, password, req): -- cgit v1.2.3 From fb45ec44220201268f99b747831df717fa7a83f8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 16:31:48 +0200 Subject: [Account] Fix __version__ --- module/plugins/accounts/SmoozedCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/SmoozedCom.py') diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py index 6ac1e9744..2da4563ab 100644 --- a/module/plugins/accounts/SmoozedCom.py +++ b/module/plugins/accounts/SmoozedCom.py @@ -26,7 +26,7 @@ from module.plugins.internal.Account import Account class SmoozedCom(Account): __name__ = "SmoozedCom" __type__ = "account" - __version__ = "0.07" + __version__ = "0.08" __status__ = "testing" __description__ = """Smoozed.com account plugin""" -- cgit v1.2.3 From ec6e5dc7fcdcefee10e37d22473c9accae1104cf Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 29 Sep 2015 20:05:07 +0200 Subject: Account class completely rewritten + plugins updated --- module/plugins/accounts/SmoozedCom.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'module/plugins/accounts/SmoozedCom.py') diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py index 2da4563ab..84858574f 100644 --- a/module/plugins/accounts/SmoozedCom.py +++ b/module/plugins/accounts/SmoozedCom.py @@ -26,7 +26,7 @@ from module.plugins.internal.Account import Account class SmoozedCom(Account): __name__ = "SmoozedCom" __type__ = "account" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __description__ = """Smoozed.com account plugin""" @@ -34,8 +34,12 @@ class SmoozedCom(Account): __authors__ = [("", "")] - def grab_info(self, user, password, data, req): - status = self.get_account_status(user, password, req) + def grab_hosters(self, user, password, data): + return self.get_data('hosters') + + + def grab_info(self, user, password, data): + status = self.get_account_status(user, password) self.log_debug(status) @@ -61,16 +65,16 @@ class SmoozedCom(Account): return info - def login(self, user, password, data, req): + def signin(self, user, password, data): #: Get user data from premiumize.me - status = self.get_account_status(user, password, req) + status = self.get_account_status(user, password) #: Check if user and password are valid if status['state'] != 'ok': self.fail_login() - def get_account_status(self, user, password, req): + def get_account_status(self, user, password): password = password salt = hashlib.sha256(password).hexdigest() encrypted = PBKDF2(password, salt, iterations=1000).hexread(32) -- cgit v1.2.3 From 3b3a4bd889286777ba6a590a1f74cf3edae36a72 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 30 Sep 2015 00:30:53 +0200 Subject: Add __config__ to MultiAccount (and XFSAccount) based plugins --- module/plugins/accounts/SmoozedCom.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'module/plugins/accounts/SmoozedCom.py') diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py index 84858574f..16b4fe7fc 100644 --- a/module/plugins/accounts/SmoozedCom.py +++ b/module/plugins/accounts/SmoozedCom.py @@ -29,6 +29,10 @@ class SmoozedCom(Account): __version__ = "0.09" __status__ = "testing" + __config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"), + ("mh_list" , "str" , "Hoster list (comma separated)", "" ), + ("mh_interval", "int" , "Reload interval in minutes" , 60 )] + __description__ = """Smoozed.com account plugin""" __license__ = "GPLv3" __authors__ = [("", "")] -- cgit v1.2.3 From 25d5726d4953b93a2e286fd6af8d4ead20670ba6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 1 Oct 2015 04:55:17 +0200 Subject: A lot of plugin code cosmetics --- module/plugins/accounts/SmoozedCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/SmoozedCom.py') diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py index 16b4fe7fc..1c3da5269 100644 --- a/module/plugins/accounts/SmoozedCom.py +++ b/module/plugins/accounts/SmoozedCom.py @@ -35,7 +35,7 @@ class SmoozedCom(Account): __description__ = """Smoozed.com account plugin""" __license__ = "GPLv3" - __authors__ = [("", "")] + __authors__ = [(None, None)] def grab_hosters(self, user, password, data): -- cgit v1.2.3