Pause video when opening in external application

This commit is contained in:
pax 2026-04-05 23:40:17 -05:00
parent b82b51bb40
commit a93a8bc70f

View File

@ -1886,6 +1886,10 @@ class BooruApp(QMainWindow):
from ..core.cache import cached_path_for, is_cached
path = cached_path_for(post.file_url)
if path.exists():
# Pause any playing video before opening externally
self._preview._video_player._player.pause()
if self._fullscreen_window and self._fullscreen_window.isVisible():
self._fullscreen_window._video._player.pause()
QDesktopServices.openUrl(QUrl.fromLocalFile(str(path)))
else:
self._status.showMessage("Image not cached yet — double-click to download first")