summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/MultishareCz.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/MultishareCz.py')
-rw-r--r--module/plugins/hoster/MultishareCz.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py
index ee84f613f..421ad111b 100644
--- a/module/plugins/hoster/MultishareCz.py
+++ b/module/plugins/hoster/MultishareCz.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MultishareCz(SimpleHoster):
__name__ = "MultishareCz"
__type__ = "hoster"
- __version__ = "0.38"
+ __version__ = "0.39"
__pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P<ID>\d+)'
@@ -21,7 +21,8 @@ class MultishareCz(SimpleHoster):
SIZE_REPLACEMENTS = [('&nbsp;', '')]
- MULTI_HOSTER = True
+ CHECK_TRAFFIC = True
+ MULTI_HOSTER = True
INFO_PATTERN = ur'(?:<li>Název|Soubor): <strong>(?P<N>[^<]+)</strong><(?:/li><li|br)>Velikost: <strong>(?P<S>[^<]+)</strong>'
OFFLINE_PATTERN = ur'<h1>Stáhnout soubor</h1><p><strong>Požadovaný soubor neexistuje.</strong></p>'
@@ -32,10 +33,6 @@ class MultishareCz(SimpleHoster):
def handlePremium(self):
- if not self.checkCredit():
- self.logWarning(_("Not enough credit left to download file"))
- self.resetAccount()
-
self.download("http://www.multishare.cz/html/download_premium.php?ID=%s" % self.info['pattern']['ID'])
@@ -44,7 +41,7 @@ class MultishareCz(SimpleHoster):
self.checkInfo()
- if not self.checkCredit():
+ if not self.checkTrafficLeft():
self.fail(_("Not enough credit left to download file"))
self.download("http://dl%d.mms.multishare.cz/html/mms_process.php" % round(random() * 10000 * random()),
@@ -54,12 +51,4 @@ class MultishareCz(SimpleHoster):
disposition=True)
- def checkCredit(self):
- self.acc_info = self.account.getAccountInfo(self.user, True)
-
- self.logInfo(_("User %s has %i MB left") % (self.user, self.acc_info['trafficleft'] / 1024))
-
- return self.pyfile.size / 1024 <= self.acc_info['trafficleft']
-
-
getInfo = create_getInfo(MultishareCz)