From 5fce9b9761537b1e171d137fe32239d5ea38566f Mon Sep 17 00:00:00 2001 From: Stefano Date: Mon, 20 May 2013 12:41:16 +0200 Subject: Premium4Me: error handled http://forum.pyload.org/viewtopic.php?f=12&t=2587 --- module/plugins/hoster/Premium4Me.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/Premium4Me.py b/module/plugins/hoster/Premium4Me.py index 2679916e9..1c65a85a4 100644 --- a/module/plugins/hoster/Premium4Me.py +++ b/module/plugins/hoster/Premium4Me.py @@ -9,13 +9,13 @@ from os import remove class Premium4Me(Hoster): __name__ = "Premium4Me" - __version__ = "0.04" + __version__ = "0.05" __type__ = "hoster" __pattern__ = r"http://premium4.me/.*" __description__ = """premium4.me hoster plugin""" - __author_name__ = ("RaNaN", "zoidberg") - __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz") + __author_name__ = ("RaNaN", "zoidberg", "stickell") + __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz", "l.stickell@yahoo.it") def setup(self): self.resumeDownload = True @@ -34,7 +34,12 @@ class Premium4Me(Hoster): self.req.setOption("timeout", 120) self.download("http://premium4.me/api/getfile.php?authcode=%s&link=%s" % (self.account.authcode, quote(pyfile.url, "")), disposition=True) - + + check = self.checkDownload({"nopremium": "No premium account available"}) + + if check == "nopremium": + self.retry(3, 60, 'No premium account available') + err = '' if self.req.http.code == '420': # Custom error code send - fail -- cgit v1.2.3