diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-08-02 07:12:26 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-08-02 07:12:26 +0200 |
commit | 53784948a3ae27ed69463eea2d7babb979460e1e (patch) | |
tree | daa3790d82436b990047619b8be743015cfafcc0 | |
parent | Fix https://github.com/pyload/pyload/issues/1640 (diff) | |
download | pyload-53784948a3ae27ed69463eea2d7babb979460e1e.tar.xz |
Fix https://github.com/pyload/pyload/issues/1646
-rw-r--r-- | module/plugins/accounts/PremiumizeMe.py | 6 | ||||
-rw-r--r-- | module/plugins/hooks/PremiumizeMeHook.py | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py index 19fce0e77..df3b5db51 100644 --- a/module/plugins/accounts/PremiumizeMe.py +++ b/module/plugins/accounts/PremiumizeMe.py @@ -17,7 +17,7 @@ class PremiumizeMe(Account): def parse_info(self, user, password, data, req): #: Get user data from premiumize.me - status = self.get_account_status(user, password, req) + status = self.get_account_status(user, password) self.log_debug(status) #: Parse account info @@ -32,14 +32,14 @@ class PremiumizeMe(Account): def login(self, user, password, data, req): #: 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['status'] != 200: self.login_fail() - def get_account_status(self, user, password, req): + def get_account_status(self, user, password): #: Use premiumize.me API v1 (see https://secure.premiumize.me/?show=api) #: To retrieve account info and return the parsed json answer answer = self.load("http://api.premiumize.me/pm-api/v1.php", #@TODO: Revert to `https` in 0.4.10 diff --git a/module/plugins/hooks/PremiumizeMeHook.py b/module/plugins/hooks/PremiumizeMeHook.py index 6be32b70b..9a9a380af 100644 --- a/module/plugins/hooks/PremiumizeMeHook.py +++ b/module/plugins/hooks/PremiumizeMeHook.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHook import MultiHook class PremiumizeMeHook(MultiHook): __name__ = "PremiumizeMeHook" __type__ = "hook" - __version__ = "0.19" + __version__ = "0.20" __status__ = "testing" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), @@ -22,12 +22,14 @@ class PremiumizeMeHook(MultiHook): def get_hosters(self): #: Get account data - user, data = self.account.select() + user, info = self.account.select() #: Get supported hosters list from premiumize.me using the #: json API v1 (see https://secure.premiumize.me/?show=api) answer = self.load("http://api.premiumize.me/pm-api/v1.php", #@TODO: Revert to `https` in 0.4.10 - get={'method': "hosterlist", 'params[login]': user, 'params[pass]': data['password']}) + get={'method' : "hosterlist", + 'params[login]': user, + 'params[pass]' : info['login']['password']}) data = json_loads(answer) #: If account is not valid thera are no hosters available |