diff --git a/main.py b/main.py index 251286d..b46ea0c 100644 --- a/main.py +++ b/main.py @@ -527,7 +527,10 @@ class MediaGrader: and not self.is_seeking ): if not self.advance_frame(): - break + # Video reached the end, restart it instead of navigating + self.current_cap.set(cv2.CAP_PROP_POS_FRAMES, 0) + self.current_frame = 0 + self.load_current_frame() if key not in [ord("p")]: self.current_index += 1