diff options
| author | 2025-10-07 02:11:45 -0400 | |
|---|---|---|
| committer | 2025-10-07 02:11:45 -0400 | |
| commit | bbe7fac03d881662a458e7fbf870c9d71f5257f4 (patch) | |
| tree | b90b8974242d7fcb381e43c69c215c97c2e99197 /gallery_dl/postprocessor/python.py | |
| parent | 42b62671fabfdcf983a9575221420d85f7fbcac1 (diff) | |
New upstream version 1.30.9.upstream/1.30.9
Diffstat (limited to 'gallery_dl/postprocessor/python.py')
| -rw-r--r-- | gallery_dl/postprocessor/python.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gallery_dl/postprocessor/python.py b/gallery_dl/postprocessor/python.py index 66d9343..5011ce8 100644 --- a/gallery_dl/postprocessor/python.py +++ b/gallery_dl/postprocessor/python.py @@ -26,6 +26,9 @@ class PythonPP(PostProcessor): module = util.import_file(module_name) self.function = getattr(module, function_name) + if archive := self._archive_init(job, options): + self.run = self.run_archive + events = options.get("event") if events is None: events = ("file",) @@ -33,8 +36,8 @@ 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 + if archive: + self._archive_register(job) def run(self, pathfmt): self.function(pathfmt.kwdict) |
