[pp:ugoira] use '_ugoira_frame_index' to detect '.zip' files

This commit is contained in:
Mike Fährmann
2025-04-17 18:37:08 +02:00
parent 31fd613fbb
commit f3ababc3be

View File

@@ -111,16 +111,13 @@ class UgoiraPP(PostProcessor):
return return
self._frames = pathfmt.kwdict["_ugoira_frame_data"] self._frames = pathfmt.kwdict["_ugoira_frame_data"]
if pathfmt.extension == "zip": index = pathfmt.kwdict.get("_ugoira_frame_index")
if index is None:
self._convert_zip = True self._convert_zip = True
if self.delete: if self.delete:
pathfmt.set_extension(self.extension) pathfmt.set_extension(self.extension)
pathfmt.build_path() pathfmt.build_path()
else: else:
index = pathfmt.kwdict.get("_ugoira_frame_index")
if index is None:
return
pathfmt.build_path() pathfmt.build_path()
frame = self._frames[index].copy() frame = self._frames[index].copy()
frame["index"] = index frame["index"] = index