From 09f0ba8e9cee151bbd03bc3b2c31b97e3fe68ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 21 Sep 2025 21:46:56 +0200 Subject: [PATCH] [pp:python] move '_init_archive()' after events (#8243) --- gallery_dl/postprocessor/python.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gallery_dl/postprocessor/python.py b/gallery_dl/postprocessor/python.py index db71da25..3ac330d4 100644 --- a/gallery_dl/postprocessor/python.py +++ b/gallery_dl/postprocessor/python.py @@ -22,9 +22,6 @@ class PythonPP(PostProcessor): module = util.import_file(module_name) self.function = getattr(module, function_name) - if self._init_archive(job, options): - self.run = self.run_archive - events = options.get("event") if events is None: events = ("file",) @@ -32,6 +29,9 @@ class PythonPP(PostProcessor): events = events.split(",") job.register_hooks({event: self.run for event in events}, options) + if self._init_archive(job, options): + self.run = self.run_archive + def run(self, pathfmt): self.function(pathfmt.kwdict)