summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar stickell <l.stickell@yahoo.it> 2014-08-31 17:55:36 +0200
committerGravatar stickell <l.stickell@yahoo.it> 2014-08-31 17:55:36 +0200
commit98d4c07b6983c98fca26f99dd7a853ab36a1d696 (patch)
treeba9f1fff9ec0cd04aabb75cb0f0b56245b4f801c
parent[VimeoCom] Private video support (diff)
downloadpyload-98d4c07b6983c98fca26f99dd7a853ab36a1d696.tar.xz
[Checksum] Moved the checksum validation toggle to the plugin because the general configuration has been removed in 0.4.10
-rw-r--r--module/plugins/hooks/Checksum.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/module/plugins/hooks/Checksum.py b/module/plugins/hooks/Checksum.py
index 0fe2ae88c..013172899 100644
--- a/module/plugins/hooks/Checksum.py
+++ b/module/plugins/hooks/Checksum.py
@@ -40,17 +40,18 @@ def computeChecksum(local_file, algorithm):
class Checksum(Hook):
__name__ = "Checksum"
__type__ = "hook"
- __version__ = "0.12"
+ __version__ = "0.13"
__config__ = [("activated", "bool", "Activated", False),
+ ("check_checksum", "bool", "Check checksum? (If False only size will be verified)", True),
("check_action", "fail;retry;nothing", "What to do if check fails?", "retry"),
("max_tries", "int", "Number of retries", 2),
("retry_action", "fail;nothing", "What to do if all retries fail?", "fail"),
("wait_time", "int", "Time to wait before each retry (seconds)", 1)]
__description__ = """Verify downloaded file size and checksum"""
- __author_name__ = ("zoidberg", "Walter Purcaro")
- __author_mail__ = ("zoidberg@mujmail.cz", "vuolter@gmail.com")
+ __author_name__ = ("zoidberg", "Walter Purcaro", "stickell")
+ __author_mail__ = ("zoidberg@mujmail.cz", "vuolter@gmail.com", "l.stickell@yahoo.it")
methods = {'sfv': 'crc32', 'crc': 'crc32', 'hash': 'md5'}
regexps = {'sfv': r'^(?P<name>[^;].+)\s+(?P<hash>[0-9A-Fa-f]{8})$',
@@ -60,8 +61,8 @@ class Checksum(Hook):
def coreReady(self):
- if not self.config['general']['checksum']:
- self.logInfo("Checksum validation is disabled in general configuration")
+ if not self.getConfig("check_checksum"):
+ self.logInfo("Checksum validation is disabled in plugin configuration")
def setup(self):
self.algorithms = sorted(
@@ -105,7 +106,7 @@ class Checksum(Hook):
del data['size']
# validate checksum
- if data and self.config['general']['checksum']:
+ if data and self.getConfig("check_checksum"):
if "checksum" in data:
data['md5'] = data['checksum']