1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-21 18:22:30 +01:00

[pp:ugoira] prevent BadZipFile exceptions (#6285)

reset '_convert_…' flags  on every 'prepare' event
This commit is contained in:
Mike Fährmann 2024-10-10 09:20:06 +02:00
parent a389b8aeaa
commit 4b7a24122e
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -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: