diff options
author | Stefano <l.stickell@yahoo.it> | 2013-10-04 22:29:40 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-10-07 11:28:52 +0200 |
commit | 4c09a9e839ab1341cc64c20210533b09d84379f7 (patch) | |
tree | 3d182cc6702b3439a4f6768decf9850a66f719a3 /pyload/plugins | |
parent | Merge pull request #295 from vuolter/s/hoster_cosmetics_fix (diff) | |
download | pyload-4c09a9e839ab1341cc64c20210533b09d84379f7.tar.xz |
Checksum: reverted b2e7352 due to a case sensitive issue
(cherry picked from commit cef7ca82b3c4eea73ed544184c17118cb310129b)
Diffstat (limited to 'pyload/plugins')
-rw-r--r-- | pyload/plugins/addons/Checksum.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/pyload/plugins/addons/Checksum.py b/pyload/plugins/addons/Checksum.py index 908286677..081e8ac3b 100644 --- a/pyload/plugins/addons/Checksum.py +++ b/pyload/plugins/addons/Checksum.py @@ -22,7 +22,6 @@ import zlib from os import remove from os.path import getsize, isfile, splitext import re -import base64 from module.utils import save_join, fs_encode from module.plugins.Hook import Hook @@ -49,25 +48,13 @@ def computeChecksum(local_file, algorithm): return "%x" % last - # Special Hash used by DDLStorage.com - # It compute the MD5 hash only on the first and the last 4096 bytes, then the hash is base64 encoded - elif algorithm == 'md5_ddlstorage': - h = hashlib.md5() - - with open(local_file, 'rb') as f: - h.update(f.read(4096)) - f.seek(-4096, 2) - h.update(f.read(4096)) - - return base64.b64encode(h.digest()).rstrip('=') - else: return None class Checksum(Hook): __name__ = "Checksum" - __version__ = "0.09" + __version__ = "0.10" __description__ = "Verify downloaded file size and checksum (enable in general preferences)" __config__ = [("activated", "bool", "Activated", True), ("action", "fail;retry;nothing", "What to do if check fails?", "retry"), @@ -88,7 +75,6 @@ class Checksum(Hook): self.algorithms = sorted( getattr(hashlib, "algorithms", ("md5", "sha1", "sha224", "sha256", "sha384", "sha512")), reverse=True) self.algorithms.extend(["crc32", "adler32"]) - self.algorithms.append('md5_ddlstorage') self.formats = self.algorithms + ['sfv', 'crc', 'hash'] def downloadFinished(self, pyfile): |