From e0e5c8d9334ccad74fa1747e9bfda3f0031f424d Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Thu, 18 Sep 2025 17:54:06 +0200 Subject: [PATCH] Fix autorepeat --- croppa/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/croppa/main.py b/croppa/main.py index 821f9c0..ddfa4c3 100644 --- a/croppa/main.py +++ b/croppa/main.py @@ -442,7 +442,7 @@ class VideoEditor: MAX_SEEK_MULTIPLIER = 1000.0 # Auto-repeat seeking configuration - AUTO_REPEAT_DISPLAY_RATE = 1.0 + AUTO_REPEAT_DISPLAY_RATE = 0.1 # Timeline configuration TIMELINE_HEIGHT = 60 @@ -959,7 +959,7 @@ class VideoEditor: # Round to 2 decimals to handle floating point precision issues speed = round(self.playback_speed, 2) print(f"Playback speed: {speed}") - if speed >= 1.0: + if speed >= 1.0 or not self.is_playing: # Speed >= 1: maximum FPS (no delay) return 1 else: @@ -3035,7 +3035,6 @@ class VideoEditor: self.advance_frame() # Key capture with appropriate delay - print(f"Delay ms: {delay_ms}") key = cv2.waitKey(delay_ms) & 0xFF # Route keys based on window focus