diff options
Diffstat (limited to 'module/plugins/accounts/MyfastfileCom.py')
-rw-r--r-- | module/plugins/accounts/MyfastfileCom.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index 244a7408b..75fd9fda9 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -9,15 +9,26 @@ from module.plugins.internal.Account import Account class MyfastfileCom(Account): __name__ = "MyfastfileCom" __type__ = "account" - __version__ = "0.07" + __version__ = "0.08" __status__ = "testing" + __config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"), + ("mh_list" , "str" , "Hoster list (comma separated)", "" ), + ("mh_interval", "int" , "Reload interval in minutes" , 60 )] + __description__ = """Myfastfile.com account plugin""" __license__ = "GPLv3" __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 +36,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, |