diff --git a/croppa/main.py b/croppa/main.py index a091d0f..c9df22f 100644 --- a/croppa/main.py +++ b/croppa/main.py @@ -13,6 +13,7 @@ import subprocess import queue import ctypes from collections import OrderedDict +from datetime import datetime from PIL import Image def load_image_utf8(image_path): @@ -960,6 +961,12 @@ class VideoEditor: json.dump(state, f, indent=2) print(f"State saved to {state_file}") + # Also save dated copy + iso_date = datetime.now().isoformat().replace(':', '-').split('.')[0] + dated_state_file = self.video_path.parent / f"{self.video_path.stem}-{iso_date}.json" + with open(dated_state_file, 'w') as f: + json.dump(state, f, indent=2) + # Refresh project view progress data if project view is active if self.project_view_mode and self.project_view: self.project_view.refresh_progress_data()