From ff42cec46274b0f2019272424c1a57ec4b413507 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 26 Dec 2014 17:58:54 +0100 Subject: [PremiumTo] Fixup --- module/plugins/hoster/PremiumTo.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'module/plugins/hoster/PremiumTo.py') 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) -- cgit v1.2.3