From 712ec761237eb989484b8c8f84fdf2d566500482 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 28 Oct 2015 00:58:56 +0100 Subject: Fix https://github.com/pyload/pyload/issues/2112 --- module/plugins/internal/SimpleHoster.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 56bd2d72f..e5ee65bdf 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -283,14 +283,10 @@ class SimpleHoster(Hoster): self.download(self.link, disposition=self.DISPOSITION) - def _check_download(self): - super(SimpleHoster, self)._check_download() - self.check_download() - - def check_download(self): - self.log_debug("Performing default check rules...") + super(SimpleHoster, self).check_download() + self.log_info(_("Checking downloaded file with built-in rules...") for r, p in self.FILE_ERRORS: errmsg = self.check_file({r: re.compile(p)}) if errmsg is not None: @@ -307,13 +303,15 @@ class SimpleHoster(Hoster): self.restart(errmsg) else: if self.CHECK_FILE: - self.log_debug("Performing custom check rules...") + self.log_info(_("Checking downloaded file with custom rules...") with open(encode(self.last_download), "rb") as f: self.data = f.read(1048576) #@TODO: Recheck in 0.4.10 self.check_errors() + self.log_info(_("File is OK")) + def check_errors(self): if not self.data: -- cgit v1.2.3