diff options
author | 2015-08-09 00:50:54 +0200 | |
---|---|---|
committer | 2015-08-09 00:50:54 +0200 | |
commit | b0ef3f1673e1930916604bb1264ca3a38414bc8d (patch) | |
tree | c97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/hooks/PremiumToHook.py | |
parent | [XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff) | |
parent | Fix https://github.com/pyload/pyload/issues/1707 (diff) | |
download | pyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz |
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/hooks/PremiumToHook.py')
-rw-r--r-- | module/plugins/hooks/PremiumToHook.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/module/plugins/hooks/PremiumToHook.py b/module/plugins/hooks/PremiumToHook.py index ef2a84223..bcd7a7aab 100644 --- a/module/plugins/hooks/PremiumToHook.py +++ b/module/plugins/hooks/PremiumToHook.py @@ -6,13 +6,13 @@ from module.plugins.internal.MultiHook import MultiHook class PremiumToHook(MultiHook): __name__ = "PremiumToHook" __type__ = "hook" - __version__ = "0.08" + __version__ = "0.11" + __status__ = "testing" - __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), - ("pluginlist" , "str" , "Plugin list (comma separated)" , "" ), - ("revertfailed" , "bool" , "Revert to standard download if fails", True ), - ("reload" , "bool" , "Reload plugin list" , True ), - ("reloadinterval", "int" , "Reload interval in hours" , 12 )] + __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), + ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), + ("reload" , "bool" , "Reload plugin list" , True ), + ("reloadinterval", "int" , "Reload interval in hours" , 12 )] __description__ = """Premium.to hook plugin""" __license__ = "GPLv3" @@ -21,7 +21,9 @@ class PremiumToHook(MultiHook): ("stickell", "l.stickell@yahoo.it")] - def getHosters(self): - html = self.getURL("http://premium.to/api/hosters.php", - get={'username': self.account.username, 'password': self.account.password}) + def get_hosters(self): + user, info = self.account.select() + html = self.load("http://premium.to/api/hosters.php", + get={'username': user, + 'password': info['login']['password']}) return [x.strip() for x in html.replace("\"", "").split(";")] |