diff options
author | 2015-01-05 19:31:35 +0100 | |
---|---|---|
committer | 2015-01-05 19:31:35 +0100 | |
commit | 7b8593899e3d37846fb3ed94d47d9daba13a02d7 (patch) | |
tree | 5427650c3dd14b0c2878a1081be3709458bf48db /module/plugins/hoster/MultishareCz.py | |
parent | Created plugin for Nitroflare.com (diff) | |
parent | Spare code improvements (diff) | |
download | pyload-7b8593899e3d37846fb3ed94d47d9daba13a02d7.tar.xz |
Merge branch 'stable' of https://github.com/pyload/pyload into stable
Diffstat (limited to 'module/plugins/hoster/MultishareCz.py')
-rw-r--r-- | module/plugins/hoster/MultishareCz.py | 19 |
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 = [(' ', '')] - 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) |