summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/MyfastfileCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/MyfastfileCom.py')
-rw-r--r--module/plugins/hoster/MyfastfileCom.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py
index 5ea2639f1..d9132c821 100644
--- a/module/plugins/hoster/MyfastfileCom.py
+++ b/module/plugins/hoster/MyfastfileCom.py
@@ -9,9 +9,10 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class MyfastfileCom(MultiHoster):
__name__ = "MyfastfileCom"
__type__ = "hoster"
- __version__ = "0.08"
+ __version__ = "0.09"
__pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Myfastfile.com multi-hoster plugin"""
__license__ = "GPLv3"
@@ -23,19 +24,16 @@ class MyfastfileCom(MultiHoster):
def handlePremium(self, pyfile):
- self.logDebug("Original URL: %s" % pyfile.url)
-
- page = self.load('http://myfastfile.com/api.php',
+ self.html = self.load('http://myfastfile.com/api.php',
get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'],
'link': pyfile.url})
- self.logDebug("JSON data: " + page)
- page = json_loads(page)
- if page['status'] != 'ok':
+ self.logDebug("JSON data: " + self.html)
+
+ self.html = json_loads(self.html)
+ if self.html['status'] != 'ok':
self.fail(_("Unable to unrestrict link"))
- self.link = page['link']
- if self.link != pyfile.url:
- self.logDebug("Unrestricted URL: " + self.link)
+ self.link = self.html['link']
getInfo = create_getInfo(MyfastfileCom)