summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/PremiumizeMe.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-27 21:20:59 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-27 21:20:59 +0100
commit575ce629081995766a231f0a9f3e97e3b79d23b1 (patch)
tree94066e87d5af5b9b1a11012eee11fcaf78bf8c68 /module/plugins/hooks/PremiumizeMe.py
parent[MultiHook] Crypter support (diff)
downloadpyload-575ce629081995766a231f0a9f3e97e3b79d23b1.tar.xz
Update MultiHook based hooks
Diffstat (limited to 'module/plugins/hooks/PremiumizeMe.py')
-rw-r--r--module/plugins/hooks/PremiumizeMe.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/module/plugins/hooks/PremiumizeMe.py b/module/plugins/hooks/PremiumizeMe.py
index b37728e06..e23f13895 100644
--- a/module/plugins/hooks/PremiumizeMe.py
+++ b/module/plugins/hooks/PremiumizeMe.py
@@ -1,18 +1,17 @@
# -*- coding: utf-8 -*-
from module.common.json_layer import json_loads
-from module.network.RequestFactory import getURL
from module.plugins.internal.MultiHook import MultiHook
class PremiumizeMe(MultiHook):
__name__ = "PremiumizeMe"
__type__ = "hook"
- __version__ = "0.14"
+ __version__ = "0.15"
- __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to stanard download if download fails", False),
+ __config__ = [("mode", "all;listed;unlisted", "Use for hosters (if supported):", "all"),
+ ("pluginlist", "str", "Hoster list (comma separated)", ""),
+ ("revertfailed", "bool", "Revert to stanard download if download fails", False),
("interval", "int", "Reload interval in hours (0 to disable)", 24)]
__description__ = """Premiumize.me hook plugin"""
@@ -20,7 +19,7 @@ class PremiumizeMe(MultiHook):
__authors__ = [("Florian Franzen", "FlorianFranzen@gmail.com")]
- def getHoster(self):
+ def getHosters(self):
# If no accounts are available there will be no hosters available
if not self.account or not self.account.canUse():
return []
@@ -30,7 +29,7 @@ class PremiumizeMe(MultiHook):
# Get supported hosters list from premiumize.me using the
# json API v1 (see https://secure.premiumize.me/?show=api)
- answer = getURL("https://api.premiumize.me/pm-api/v1.php",
+ answer = self.getURL("https://api.premiumize.me/pm-api/v1.php",
get={'method': "hosterlist", 'params[login]': user, 'params[pass]': data['password']})
data = json_loads(answer)