summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/MyfastfileCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-09-29 20:05:07 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-09-29 20:05:07 +0200
commitec6e5dc7fcdcefee10e37d22473c9accae1104cf (patch)
treed19824c0223b083d5b4256530443165cfabb7a04 /module/plugins/accounts/MyfastfileCom.py
parentMerge pull request #1850 from chaosblog/patch-2 (diff)
downloadpyload-ec6e5dc7fcdcefee10e37d22473c9accae1104cf.tar.xz
Account class completely rewritten + plugins updated
Diffstat (limited to 'module/plugins/accounts/MyfastfileCom.py')
-rw-r--r--module/plugins/accounts/MyfastfileCom.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py
index 244a7408b..1b4854751 100644
--- a/module/plugins/accounts/MyfastfileCom.py
+++ b/module/plugins/accounts/MyfastfileCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account
class MyfastfileCom(Account):
__name__ = "MyfastfileCom"
__type__ = "account"
- __version__ = "0.07"
+ __version__ = "0.08"
__status__ = "testing"
__description__ = """Myfastfile.com account plugin"""
@@ -17,7 +17,14 @@ class MyfastfileCom(Account):
__authors__ = [("stickell", "l.stickell@yahoo.it")]
- def grab_info(self, user, password, data, req):
+ def grab_hosters(self, user, password, data):
+ json_data = self.load("http://myfastfile.com/api.php", get={'hosts': ""})
+ self.log_debug("JSON data", json_data)
+ json_data = json_loads(json_data)
+
+ return json_data['hosts']
+
+ def grab_info(self, user, password, data):
if 'days_left' in self.json_data:
validuntil = time.time() + self.json_data['days_left'] * 24 * 60 * 60
return {'premium': True, 'validuntil': validuntil, 'trafficleft': -1}
@@ -25,7 +32,7 @@ class MyfastfileCom(Account):
self.log_error(_("Unable to get account information"))
- def login(self, user, password, data, req):
+ def signin(self, user, password, data):
#: Password to use is the API-Password written in http://myfastfile.com/myaccount
html = self.load("https://myfastfile.com/api.php",
get={'user': user,