Manual mode pauses at end of current video instead of restarting

This commit is contained in:
pax 2026-04-05 03:27:00 -05:00
parent 78f2dc030f
commit 0362256bbd

View File

@ -470,10 +470,14 @@ class VideoPlayer(QWidget):
self._seek_slider.setValue(pos) self._seek_slider.setValue(pos)
self._time_label.setText(self._fmt(pos)) self._time_label.setText(self._fmt(pos))
# Detect loop restart: position jumps from near-end back to start # Detect loop restart: position jumps from near-end back to start
if self._last_pos > 500 and pos < 100 and not self._loop_mode and not self._ended: if self._last_pos > 500 and pos < 100 and not self._ended:
self._ended = True if not self._loop_mode:
self._player.pause() self._ended = True
self.play_next.emit() self._player.pause()
self.play_next.emit()
elif not self._autoplay:
self._ended = True
self._player.pause()
self._last_pos = pos self._last_pos = pos
def _on_duration(self, dur: int) -> None: def _on_duration(self, dur: int) -> None: