diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-22 19:44:59 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-22 19:47:17 +0200 |
commit | 0eb6e7ec4a1144dcca824d8add049787d3da1762 (patch) | |
tree | d653f5fe28bb247a3c4fadeca9bf6278d744f929 /module/plugins/hooks/Checksum.py | |
parent | Spare code cosmetics (diff) | |
download | pyload-0eb6e7ec4a1144dcca824d8add049787d3da1762.tar.xz |
Two space before function declaration
Diffstat (limited to 'module/plugins/hooks/Checksum.py')
-rw-r--r-- | module/plugins/hooks/Checksum.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/module/plugins/hooks/Checksum.py b/module/plugins/hooks/Checksum.py index 32597beeb..4a7cfd661 100644 --- a/module/plugins/hooks/Checksum.py +++ b/module/plugins/hooks/Checksum.py @@ -67,12 +67,14 @@ class Checksum(Hook): if not self.getConfig("check_checksum"): self.logInfo(_("Checksum validation is disabled in plugin configuration")) + def setup(self): self.algorithms = sorted( getattr(hashlib, "algorithms", ("md5", "sha1", "sha224", "sha256", "sha384", "sha512")), reverse=True) self.algorithms.extend(["crc32", "adler32"]) self.formats = self.algorithms + ["sfv", "crc", "hash"] + def downloadFinished(self, pyfile): """ Compute checksum for the downloaded file and compare it with the hash provided by the hoster. @@ -130,6 +132,7 @@ class Checksum(Hook): else: self.logWarning(_("Unable to validate checksum for file"), pyfile.name) + def checkFailed(self, pyfile, local_file, msg): check_action = self.getConfig("check_action") if check_action == "retry": @@ -145,6 +148,7 @@ class Checksum(Hook): return pyfile.plugin.fail(reason=msg) + def packageFinished(self, pypack): download_folder = save_join(self.config['general']['download_folder'], pypack.folder, "") |