From 4b7a24122e18bc8201f29226e6fd4ef5626cb299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 10 Oct 2024 09:20:06 +0200 Subject: [PATCH] [pp:ugoira] prevent BadZipFile exceptions (#6285) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit reset '_convert_…' flags on every 'prepare' event --- gallery_dl/postprocessor/ugoira.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gallery_dl/postprocessor/ugoira.py b/gallery_dl/postprocessor/ugoira.py index ae720713..fec4ab02 100644 --- a/gallery_dl/postprocessor/ugoira.py +++ b/gallery_dl/postprocessor/ugoira.py @@ -105,6 +105,7 @@ class UgoiraPP(PostProcessor): }, options) def prepare(self, pathfmt): + self._convert_zip = self._convert_files = False if "_ugoira_frame_data" not in pathfmt.kwdict: self._frames = None return @@ -136,7 +137,6 @@ class UgoiraPP(PostProcessor): def convert_from_zip(self, pathfmt): if not self._convert_zip: return - self._convert_zip = False self._zip_source = True with self._tempdir() as tempdir: @@ -166,7 +166,6 @@ class UgoiraPP(PostProcessor): def convert_from_files(self, pathfmt): if not self._convert_files: return - self._convert_files = False self._zip_source = False with tempfile.TemporaryDirectory() as tempdir: