diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-26 17:58:54 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-26 17:58:54 +0100 |
commit | ff42cec46274b0f2019272424c1a57ec4b413507 (patch) | |
tree | fe2ead3503f68aebb0dea5ef739fb22417d0cc68 /module/plugins/hoster/PremiumTo.py | |
parent | [SimpleHoster] getInfo handle direct link error (diff) | |
download | pyload-ff42cec46274b0f2019272424c1a57ec4b413507.tar.xz |
[PremiumTo] Fixup
Diffstat (limited to 'module/plugins/hoster/PremiumTo.py')
-rw-r--r-- | module/plugins/hoster/PremiumTo.py | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py index b6194ef73..fd5853f45 100644 --- a/module/plugins/hoster/PremiumTo.py +++ b/module/plugins/hoster/PremiumTo.py @@ -13,7 +13,7 @@ from module.utils import fs_encode class PremiumTo(MultiHoster): __name__ = "PremiumTo" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __pattern__ = r'https?://(?:www\.)?premium\.to/.*' @@ -30,8 +30,6 @@ class PremiumTo(MultiHoster): def handlePremium(self): - tra = self.getTraffic() - #raise timeout to 2min self.req.setOption("timeout", 120) @@ -59,21 +57,8 @@ class PremiumTo(MultiHoster): err = f.read(256).strip() remove(lastDownload) - trb = self.getTraffic() - self.logInfo(_("Filesize: %d, Traffic used %d, traffic left %d") % (self.pyfile.size, tra - trb, trb)) - if err: self.fail(err) - def getTraffic(self): - try: - api_r = self.load("http://premium.to/api/straffic.php", - get={'username': self.account.username, 'password': self.account.password}) - traffic = sum(map(int, api_r.split(';'))) - except: - traffic = 0 - return traffic - - getInfo = create_getInfo(PremiumTo) |