aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/postprocessor/python.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-10-07 02:11:52 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2025-10-07 02:11:52 -0400
commit83e1e051b8c0e622ef5f61c1955c47b4bde95b57 (patch)
tree544a434cb398d2adb8b8a2d553dc1c9a44b4ee1d /gallery_dl/postprocessor/python.py
parentf1612851ae9fe68c7444fb31e786503868aeaa7c (diff)
parentbbe7fac03d881662a458e7fbf870c9d71f5257f4 (diff)
Update upstream source from tag 'upstream/1.30.9'
Update to upstream version '1.30.9' with Debian dir 46cc56e13f05f4465cc64f67b4d7b775a95bd87a
Diffstat (limited to 'gallery_dl/postprocessor/python.py')
-rw-r--r--gallery_dl/postprocessor/python.py7
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)