add --no-postprocessors command-line option (#2725)

This commit is contained in:
Mike Fährmann
2022-07-03 12:09:09 +02:00
parent c794777600
commit 5806a1851e
2 changed files with 8 additions and 0 deletions

View File

@@ -439,6 +439,9 @@ class DownloadJob(Job):
if self.archive:
self.archive.check = pathfmt.exists
if not cfg("postprocess", True):
return
postprocessors = extr.config_accumulate("postprocessors")
if postprocessors:
self.hooks = collections.defaultdict(list)

View File

@@ -283,6 +283,11 @@ def build_parser():
dest="download", nargs=0, action=ConfigConstAction, const=False,
help=("Do not download any files")
)
downloader.add_argument(
"--no-postprocessors",
dest="postprocess", nargs=0, action=ConfigConstAction, const=False,
help=("Do not run any post processors")
)
downloader.add_argument(
"--no-check-certificate",
dest="verify", nargs=0, action=ConfigConstAction, const=False,