From 6b60af3d42fb3e5b68826ca370e39fc50b4d584f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 26 Dec 2014 04:22:34 +0100 Subject: [CloudzillaTo] Fixup --- module/plugins/hoster/CloudzillaTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/CloudzillaTo.py') diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py index 442b0dd6c..d8b5e8b5d 100644 --- a/module/plugins/hoster/CloudzillaTo.py +++ b/module/plugins/hoster/CloudzillaTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class CloudzillaTo(SimpleHoster): __name__ = "CloudzillaTo" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P[\w^_]+)' @@ -51,7 +51,7 @@ class CloudzillaTo(SimpleHoster): self.link = "http://%(server)s/download/%(file_id)s/%(ticket_id)s" % {'server' : ticket['server'], 'file_id' : self.info['pattern']['ID'], - 'ticket_id': ticket['ticket_id']}) + 'ticket_id': ticket['ticket_id']} def handlePremium(self): -- cgit v1.2.3 From fd105f8e51768ec1943cda2375bdfdbe5b0a3951 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 9 Jan 2015 00:35:51 +0100 Subject: "New Year" Update: hoster plugins --- module/plugins/hoster/CloudzillaTo.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/CloudzillaTo.py') diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py index d8b5e8b5d..58b1ac0dd 100644 --- a/module/plugins/hoster/CloudzillaTo.py +++ b/module/plugins/hoster/CloudzillaTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class CloudzillaTo(SimpleHoster): __name__ = "CloudzillaTo" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P[\w^_]+)' @@ -32,7 +32,7 @@ class CloudzillaTo(SimpleHoster): self.retry(reason="Wrong password") - def handleFree(self): + def handleFree(self, pyfile): self.html = self.load("http://www.cloudzilla.to/generateticket/", post={'file_id': self.info['pattern']['ID'], 'key': self.getPassword()}) @@ -54,8 +54,8 @@ class CloudzillaTo(SimpleHoster): 'ticket_id': ticket['ticket_id']} - def handlePremium(self): - return self.handleFree() + def handlePremium(self, pyfile): + return self.handleFree(pyfile) getInfo = create_getInfo(CloudzillaTo) -- cgit v1.2.3 From e9eb993cb369aef09741917370f2518168465f8c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 28 Jan 2015 01:34:38 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/CloudzillaTo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/CloudzillaTo.py') diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py index 58b1ac0dd..ee966c280 100644 --- a/module/plugins/hoster/CloudzillaTo.py +++ b/module/plugins/hoster/CloudzillaTo.py @@ -47,7 +47,7 @@ class CloudzillaTo(SimpleHoster): self.fail(ticket['error']) if 'wait' in ticket: - self.wait(int(ticket['wait']), int(ticket['wait']) > 5) + self.wait(ticket['wait'], int(ticket['wait']) > 5) self.link = "http://%(server)s/download/%(file_id)s/%(ticket_id)s" % {'server' : ticket['server'], 'file_id' : self.info['pattern']['ID'], -- cgit v1.2.3 From 7d90803262ccbb4fc5296a4dc3ce30fe98f55631 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 25 Mar 2015 23:10:07 +0100 Subject: __config__ cosmetics --- module/plugins/hoster/CloudzillaTo.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/CloudzillaTo.py') diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py index ee966c280..362a8d953 100644 --- a/module/plugins/hoster/CloudzillaTo.py +++ b/module/plugins/hoster/CloudzillaTo.py @@ -11,6 +11,7 @@ class CloudzillaTo(SimpleHoster): __version__ = "0.06" __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P[\w^_]+)' + __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Cloudzilla.to hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 14600aa22812176c4f61ffcfd4ae3b0ee62ae368 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 18 May 2015 05:25:09 +0200 Subject: Spare plugins updates --- module/plugins/hoster/CloudzillaTo.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/CloudzillaTo.py') diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py index 362a8d953..09453137d 100644 --- a/module/plugins/hoster/CloudzillaTo.py +++ b/module/plugins/hoster/CloudzillaTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class CloudzillaTo(SimpleHoster): __name__ = "CloudzillaTo" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P[\w^_]+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -25,12 +25,17 @@ class CloudzillaTo(SimpleHoster): def checkErrors(self): - m = re.search(self.PASSWORD_PATTERN, self.html) - if m: - self.html = self.load(self.pyfile.url, get={'key': self.getPassword()}) + if re.search(self.PASSWORD_PATTERN, self.html): + pw = self.getPassword() + if pw: + self.html = self.load(self.pyfile.url, get={'key': pw}) + else: + self.fail(_("Missing password")) if re.search(self.PASSWORD_PATTERN, self.html): self.retry(reason="Wrong password") + else: + return super(CloudzillaTo, self).checkErrors() def handleFree(self, pyfile): -- cgit v1.2.3