From 5806a1851e4d8b50ccc274b3976e3787a1606345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 3 Jul 2022 12:09:09 +0200 Subject: [PATCH] add --no-postprocessors command-line option (#2725) --- gallery_dl/job.py | 3 +++ gallery_dl/option.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/gallery_dl/job.py b/gallery_dl/job.py index a0adffbd..9636bef1 100644 --- a/gallery_dl/job.py +++ b/gallery_dl/job.py @@ -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) diff --git a/gallery_dl/option.py b/gallery_dl/option.py index 2e996918..37247a7e 100644 --- a/gallery_dl/option.py +++ b/gallery_dl/option.py @@ -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,