summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/FastixRu.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/FastixRu.py')
-rw-r--r--module/plugins/hoster/FastixRu.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py
index b68c79ebc..9a38f5a72 100644
--- a/module/plugins/hoster/FastixRu.py
+++ b/module/plugins/hoster/FastixRu.py
@@ -12,11 +12,11 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class FastixRu(MultiHoster):
__name__ = "FastixRu"
__type__ = "hoster"
- __version__ = "0.08"
+ __version__ = "0.09"
__pattern__ = r'http://(?:www\.)?fastix\.(ru|it)/file/\w{24}'
- __description__ = """Fastix hoster plugin"""
+ __description__ = """Fastix multi-hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("Massimo Rosamilia", "max@spiritix.eu")]
@@ -35,12 +35,12 @@ class FastixRu(MultiHoster):
self.chunkLimit = 3
- def handlePremium(self):
+ def handlePremium(self, pyfile):
api_key = self.account.getAccountData(self.user)
api_key = api_key['api']
page = self.load("http://fastix.ru/api_v2/",
- get={'apikey': api_key, 'sub': "getdirectlink", 'link': self.pyfile.url})
+ get={'apikey': api_key, 'sub': "getdirectlink", 'link': pyfile.url})
data = json_loads(page)
self.logDebug("Json data", data)
@@ -50,19 +50,19 @@ class FastixRu(MultiHoster):
else:
self.link = data['downloadlink']
- if self.link != self.pyfile.url:
+ if self.link != pyfile.url:
self.logDebug("New URL: %s" % self.link)
- if self.pyfile.name.startswith("http") or self.pyfile.name.startswith("Unknown"):
+ if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown"):
#only use when name wasnt already set
- self.pyfile.name = self.getFilename(self.link)
+ pyfile.name = self.getFilename(self.link)
def checkFile(self):
- super(FastixRu, self).checkFile()
-
- if self.checkDownload({"error": "<title>An error occurred while processing your request</title>"}) is "error":
+ if self.checkDownload({"error": "<title>An error occurred while processing your request</title>"}):
self.retry(wait_time=60, reason=_("An error occurred while generating link"))
+ return super(FastixRu, self).checkFile()
+
getInfo = create_getInfo(FastixRu)