From 6d9c5ff2e06e06e33fa6674f013dd0e290092bbd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 20 Dec 2014 14:25:57 +0100 Subject: [SimpleHoster] Improve checkFile --- module/plugins/internal/SimpleHoster.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 949a6c66a..784ef8c85 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -155,7 +155,7 @@ def _isDirectLink(self, url, resumable=True): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "0.76" + __version__ = "0.77" __pattern__ = r'^unmatchable$' @@ -407,11 +407,16 @@ class SimpleHoster(Hoster): def downloadLink(self, link): if link and isinstance(link, basestring): + self.correctCaptcha() self.download(link, disposition=True) def checkFile(self): - if not self.lastDownload or not exists(fs_encode(self.lastDownload)): + if self.cTask and not self.lastDownload: + self.invalidCaptcha() + self.retry(10, reason=_("Wrong captcha")) + + elif not self.lastDownload or not exists(fs_encode(self.lastDownload)): self.fail(_("No file downloaded")) else: -- cgit v1.2.3