From b93cbe67209f0f3bc3ca4429296d607e5a9b03a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 7 Jun 2021 22:15:36 +0200 Subject: [PATCH] [postprocessor:zip] run 'finalize()' regardless of 'filter' (#1460) --- gallery_dl/postprocessor/zip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gallery_dl/postprocessor/zip.py b/gallery_dl/postprocessor/zip.py index b99f6599..1c4bd03b 100644 --- a/gallery_dl/postprocessor/zip.py +++ b/gallery_dl/postprocessor/zip.py @@ -41,8 +41,8 @@ class ZipPP(PostProcessor): job.register_hooks({ "file": self.write_safe if options.get("mode") == "safe" else self.write, - "finalize": self.finalize, }, options) + job.hooks["finalize"].append(self.finalize) def write(self, pathfmt, zfile=None): # 'NameToInfo' is not officially documented, but it's available @@ -58,7 +58,7 @@ class ZipPP(PostProcessor): def write_safe(self, pathfmt): with zipfile.ZipFile(*self.args) as zfile: - self._write(pathfmt, zfile) + self.write(pathfmt, zfile) def finalize(self, pathfmt, status): if self.zfile: