summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/SmoozedCom.py
diff options
context:
space:
mode:
authorGravatar jansohn <jansohn@users.noreply.github.com> 2015-10-02 10:09:26 +0200
committerGravatar jansohn <jansohn@users.noreply.github.com> 2015-10-02 10:09:26 +0200
commit3a08656c5665f4b8db98744fb323e64b8630e084 (patch)
tree28f9f62ffc57888b76ca32540dbf5af3a4cfc8d0 /module/plugins/accounts/SmoozedCom.py
parentMerge pull request #1 from pyload/stable (diff)
parent[Account] Improve parse_traffic method + code cosmetics (diff)
downloadpyload-3a08656c5665f4b8db98744fb323e64b8630e084.tar.xz
Merge pull request #2 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/accounts/SmoozedCom.py')
-rw-r--r--module/plugins/accounts/SmoozedCom.py24
1 files changed, 16 insertions, 8 deletions
diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py
index 9c2451794..1c3da5269 100644
--- a/module/plugins/accounts/SmoozedCom.py
+++ b/module/plugins/accounts/SmoozedCom.py
@@ -26,16 +26,24 @@ from module.plugins.internal.Account import Account
class SmoozedCom(Account):
__name__ = "SmoozedCom"
__type__ = "account"
- __version__ = "0.07"
+ __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__ = [("", "")]
+ __authors__ = [(None, None)]
+
+
+ def grab_hosters(self, user, password, data):
+ return self.get_data('hosters')
- def parse_info(self, user, password, data, req):
- status = self.get_account_status(user, password, req)
+ def grab_info(self, user, password, data):
+ status = self.get_account_status(user, password)
self.log_debug(status)
@@ -61,16 +69,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.login_fail()
+ 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)