diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-09 00:35:51 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-09 00:35:51 +0100 |
commit | fd105f8e51768ec1943cda2375bdfdbe5b0a3951 (patch) | |
tree | ccbdbe3cd23c606e8102f11ae4e0722f7e7a3227 /module/plugins/hoster/PremiumTo.py | |
parent | "New Year" Update: hook plugins (diff) | |
download | pyload-fd105f8e51768ec1943cda2375bdfdbe5b0a3951.tar.xz |
"New Year" Update: hoster plugins
Diffstat (limited to 'module/plugins/hoster/PremiumTo.py')
-rw-r--r-- | module/plugins/hoster/PremiumTo.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py index 11d4e9541..665005ec3 100644 --- a/module/plugins/hoster/PremiumTo.py +++ b/module/plugins/hoster/PremiumTo.py @@ -11,35 +11,28 @@ from module.utils import fs_encode class PremiumTo(MultiHoster): __name__ = "PremiumTo" __type__ = "hoster" - __version__ = "0.19" + __version__ = "0.20" __pattern__ = r'^unmatchable$' - __description__ = """Premium.to hoster plugin""" + __description__ = """Premium.to multi-hoster plugin""" __license__ = "GPLv3" __authors__ = [("RaNaN", "RaNaN@pyload.org"), ("zoidberg", "zoidberg@mujmail.cz"), ("stickell", "l.stickell@yahoo.it")] - CHECK_TRAFFIC = True - - - def handlePremium(self): + def handlePremium(self, pyfile): #raise timeout to 2min self.download("http://premium.to/api/getfile.php", get={'username': self.account.username, 'password': self.account.password, - 'link' : self.pyfile.url}, + 'link' : pyfile.url}, disposition=True) def checkFile(self): - super(PremiumTo, self).checkFile() - - check = self.checkDownload({'nopremium': "No premium account available"}) - - if check == "nopremium": + if self.checkDownload({'nopremium': "No premium account available"}): self.retry(60, 5 * 60, "No premium account available") err = '' @@ -53,5 +46,7 @@ class PremiumTo(MultiHoster): if err: self.fail(err) + return super(PremiumTo, self).checkFile() + getInfo = create_getInfo(PremiumTo) |