From cd7cc426ae3a20194d4c4f5b1e642f4d75aae4ff Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Wed, 26 Nov 2025 14:30:51 +0100 Subject: [PATCH] Loop segments --- main.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index 5c39ec6..cb6750a 100644 --- a/main.py +++ b/main.py @@ -675,14 +675,9 @@ class MediaGrader: # Advance to next frame in this segment self.segment_current_frames[i] += 1 - # Get the segment boundaries - start_frame = self.segment_positions[i] - end_frame = self.segment_end_positions[i] - - # Loop within the segment bounds - if self.segment_current_frames[i] > end_frame: - # Loop back to start of segment - self.segment_current_frames[i] = start_frame + # Loop over the entire video, starting from the segment's initial position + if self.segment_current_frames[i] >= self.total_frames: + self.segment_current_frames[i] = 0 # Ensure we don't go beyond the video cache if self.segment_current_frames[i] < len(self.video_frame_cache):