From d27d3d0653fa4e12f21cdcc4764b38c5d61a5cab Mon Sep 17 00:00:00 2001 From: jlw_4049 Date: Sun, 25 Aug 2024 14:00:27 -0400 Subject: [PATCH] feat: v1.3.3 fix: an edge case bug that could potentially cause data loss when generating the final folder fix: a bug where the encode would attempt to use the source index file, generating a new one in it's place incorrectly (this was present in ffms2) --- frame_forge.py | 2 +- frame_forge/__init__.py | 7 +++++-- pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/frame_forge.py b/frame_forge.py index f20d638..f553312 100644 --- a/frame_forge.py +++ b/frame_forge.py @@ -7,7 +7,7 @@ from frame_forge.cli_utils import frame_list program_name = "FrameForge" -__version__ = "1.3.2" +__version__ = "1.3.3" if __name__ == "__main__": diff --git a/frame_forge/__init__.py b/frame_forge/__init__.py index d9e435c..3216aff 100644 --- a/frame_forge/__init__.py +++ b/frame_forge/__init__.py @@ -398,7 +398,10 @@ class GenerateImages: ) if image_output_dir.exists(): - shutil.rmtree(image_output_dir, ignore_errors=True) + for folder in ("img_comparison", "img_selected", "img_sync"): + rm_path = image_output_dir / folder + if rm_path.is_dir() and rm_path.exists(): + shutil.rmtree(rm_path, ignore_errors=True) image_output_dir.mkdir(exist_ok=True, parents=True) @@ -688,7 +691,7 @@ class GenerateImages: self.source_index_path = Path(self.source_index_path) if not self.encode_index_path or not Path(self.encode_index_path).exists(): - encode_path_obj = Path(self.source_file) + encode_path_obj = Path(self.encode_file) self.encode_index_path = encode_path_obj.parent / Path( f"{encode_path_obj.stem}{indexer_ext}" ) diff --git a/pyproject.toml b/pyproject.toml index 5a8af0d..d56d365 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "frame-forge" -version = "1.0.3" +version = "1.3.3" description = "CLI to offload image generation to" authors = ["jlw4049 "] license = "MIT"