fix(main.py): restart video on reaching end instead of breaking loop

This commit is contained in:
2025-08-19 08:17:28 +02:00
parent c08719be70
commit 554b4ffc26

View File

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