Keep history of states

This commit is contained in:
2025-12-22 10:28:06 +01:00
parent 3d36a36f26
commit 4b9e8ecf45

View File

@@ -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()