summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/hoster')
-rw-r--r--pyload/plugins/hoster/PremiumizeMe.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/pyload/plugins/hoster/PremiumizeMe.py b/pyload/plugins/hoster/PremiumizeMe.py
index e72ade08f..85be4ec72 100644
--- a/pyload/plugins/hoster/PremiumizeMe.py
+++ b/pyload/plugins/hoster/PremiumizeMe.py
@@ -1,6 +1,5 @@
-from module.plugins.Hoster import Hoster
-
-from module.common.json_layer import json_loads
+from pyload.plugins.Hoster import Hoster
+from pyload.utils import json_loads
class PremiumizeMe(Hoster):
__name__ = "PremiumizeMe"
@@ -16,7 +15,7 @@ class PremiumizeMe(Hoster):
def process(self, pyfile):
# Check account
- if not self.account or not self.account.canUse():
+ if not self.account or not self.account.isUsable():
self.logError(_("Please enter a valid premiumize.me account or deactivate this plugin"))
self.fail("No valid premiumize.me account provided")
@@ -29,11 +28,9 @@ class PremiumizeMe(Hoster):
if temp.pop() in suffix_to_remove:
self.pyfile.name = ".".join(temp)
- # Get account data
- (user, data) = self.account.selectAccount()
-
+
# Get rewritten link using the premiumize.me api v1 (see https://secure.premiumize.me/?show=api)
- answer = self.load("https://api.premiumize.me/pm-api/v1.php?method=directdownloadlink&params[login]=%s&params[pass]=%s&params[link]=%s" % (user, data['password'], self.pyfile.url))
+ answer = self.load("https://api.premiumize.me/pm-api/v1.php?method=directdownloadlink&params[login]=%s&params[pass]=%s&params[link]=%s" % (self.account.loginname, self.account.password, self.pyfile.url))
data = json_loads(answer)
# Check status and decide what to do