From f99c6031e041ee6e0e7cba03526a3003d1b6bd91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 17 Nov 2020 00:38:29 +0100 Subject: [PATCH] apply post processor blacklists/whitelists to basecategories (#1103) --- gallery_dl/job.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gallery_dl/job.py b/gallery_dl/job.py index 66dea088..f6c4b748 100644 --- a/gallery_dl/job.py +++ b/gallery_dl/job.py @@ -410,13 +410,20 @@ class DownloadJob(Job): pp_log = self.get_logger("postprocessor") pp_list = [] category = self.extractor.category + basecategory = self.extractor.basecategory for pp_dict in postprocessors: + whitelist = pp_dict.get("whitelist") + if whitelist and category not in whitelist and \ + basecategory not in whitelist: + continue + blacklist = pp_dict.get("blacklist") - if (whitelist and category not in whitelist or - blacklist and category in blacklist): + if blacklist and ( + category in blacklist or basecategory in blacklist): continue + name = pp_dict.get("name") pp_cls = postprocessor.find(name) if not pp_cls: