summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/accounts/Premium4Me.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-07-12 13:12:59 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-07-12 13:12:59 +0200
commit3512605b8c0370905ae9e7a2adc79ddded2d8d20 (patch)
treeb7a9b68ebd599ecbe96dee0ca650d120093f632b /pyload/plugins/accounts/Premium4Me.py
parentMerge remote-tracking branch 'origin/stable' (diff)
downloadpyload-3512605b8c0370905ae9e7a2adc79ddded2d8d20.tar.xz
fixed addon related bugs
Diffstat (limited to 'pyload/plugins/accounts/Premium4Me.py')
-rw-r--r--pyload/plugins/accounts/Premium4Me.py32
1 files changed, 14 insertions, 18 deletions
diff --git a/pyload/plugins/accounts/Premium4Me.py b/pyload/plugins/accounts/Premium4Me.py
index de1538e4a..fbca3ce84 100644
--- a/pyload/plugins/accounts/Premium4Me.py
+++ b/pyload/plugins/accounts/Premium4Me.py
@@ -1,27 +1,23 @@
-# -*- coding: utf-8 -*-
-from module.plugins.MultiHoster import MultiHoster
+from module.plugins.Account import Account
-class Premium4Me(MultiHoster):
+class Premium4Me(Account):
__name__ = "Premium4Me"
- __version__ = "0.10"
+ __version__ = "0.03"
__type__ = "account"
- __description__ = """Premium4.me account plugin"""
- __author_name__ = ("RaNaN", "zoidberg")
- __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz")
+ __description__ = """Premium.to account plugin"""
+ __author_name__ = ("RaNaN", "zoidberg", "stickell")
+ __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz", "l.stickell@yahoo.it")
- def loadAccountInfo(self, req):
- traffic = req.load("http://premium4.me/api/traffic.php?authcode=%s" % self.authcode)
+ def loadAccountInfo(self, user, req):
+ traffic = req.load("http://premium.to/api/traffic.php?authcode=%s" % self.authcode)
- account_info = {"trafficleft": int(traffic) / 1024, "validuntil": -1}
+ account_info = {"trafficleft": int(traffic) / 1024,
+ "validuntil": -1}
return account_info
- def login(self, req):
- self.authcode = req.load("http://premium4.me/api/getauthcode.php?username=%s&password=%s" % (self.loginname, self.password)).strip()
-
- if "wrong username" in self.authcode:
- self.wrongPassword()
+ def login(self, user, data, req):
+ self.authcode = req.load("http://premium.to/api/getauthcode.php?username=%s&password=%s" % (user, data["password"])).strip()
- def loadHosterList(self, req):
- page = req.load("http://premium4.me/api/hosters.php?authcode=%s" % self.authcode)
- return [x.strip() for x in page.replace("\"", "").split(";")] \ No newline at end of file
+ if "wrong username" in self.authcode:
+ self.wrongPassword() \ No newline at end of file