feat(main.py): increase seek multiplier increment and add debug prints for state management
This commit is contained in:
@@ -19,7 +19,7 @@ class VideoEditor:
|
||||
MAX_PLAYBACK_SPEED = 10.0
|
||||
|
||||
# Seek multiplier configuration
|
||||
SEEK_MULTIPLIER_INCREMENT = 1.0
|
||||
SEEK_MULTIPLIER_INCREMENT = 2.0
|
||||
MIN_SEEK_MULTIPLIER = 1.0
|
||||
MAX_SEEK_MULTIPLIER = 100.0
|
||||
|
||||
@@ -116,10 +116,6 @@ class VideoEditor:
|
||||
self.brightness = 0 # -100 to 100
|
||||
self.contrast = 1.0 # 0.1 to 3.0
|
||||
|
||||
# Cut points
|
||||
self.cut_start_frame = None
|
||||
self.cut_end_frame = None
|
||||
|
||||
# Marker looping state
|
||||
self.looping_between_markers = False
|
||||
|
||||
@@ -150,8 +146,11 @@ class VideoEditor:
|
||||
def _get_state_file_path(self) -> Path:
|
||||
"""Get the state file path for the current media file"""
|
||||
if not hasattr(self, 'video_path') or not self.video_path:
|
||||
print("DEBUG: No video_path available for state file")
|
||||
return None
|
||||
return self.video_path.with_suffix('.json')
|
||||
state_path = self.video_path.with_suffix('.json')
|
||||
print(f"DEBUG: State file path would be: {state_path}")
|
||||
return state_path
|
||||
|
||||
def save_state(self):
|
||||
"""Save current editor state to JSON file"""
|
||||
@@ -225,6 +224,12 @@ class VideoEditor:
|
||||
if 'cut_end_frame' in state:
|
||||
self.cut_end_frame = state['cut_end_frame']
|
||||
print(f"Restored cut_end_frame: {self.cut_end_frame}")
|
||||
|
||||
# Calculate and show marker positions on timeline
|
||||
if self.cut_start_frame is not None and self.cut_end_frame is not None:
|
||||
start_progress = self.cut_start_frame / max(1, self.total_frames - 1)
|
||||
end_progress = self.cut_end_frame / max(1, self.total_frames - 1)
|
||||
print(f"Markers will be drawn at: Start {start_progress:.4f} ({self.cut_start_frame}/{self.total_frames}), End {end_progress:.4f} ({self.cut_end_frame}/{self.total_frames})")
|
||||
if 'looping_between_markers' in state:
|
||||
self.looping_between_markers = state['looping_between_markers']
|
||||
if 'display_offset' in state:
|
||||
|
Reference in New Issue
Block a user