always initialize DownloadJob.hooks (fixes #1135)

and not just when any (potential) post processors are defined
This commit is contained in:
Mike Fährmann
2020-11-27 23:57:41 +01:00
parent ae6a1d5fbc
commit 9c29fc4e55

View File

@@ -411,9 +411,9 @@ class DownloadJob(Job):
if self.archive: if self.archive:
self.archive.check = pathfmt.exists self.archive.check = pathfmt.exists
self.hooks = collections.defaultdict(list)
postprocessors = self.extractor.config_accumulate("postprocessors") postprocessors = self.extractor.config_accumulate("postprocessors")
if postprocessors: if postprocessors:
self.hooks = collections.defaultdict(list)
pp_log = self.get_logger("postprocessor") pp_log = self.get_logger("postprocessor")
pp_list = [] pp_list = []
category = self.extractor.category category = self.extractor.category