Clear slideshow when blacklisting the previewed post

This commit is contained in:
pax 2026-04-05 13:53:35 -05:00
parent 9518f95a3c
commit 04ffe5c602

View File

@ -1433,15 +1433,21 @@ class BooruApp(QMainWindow):
cp = str(cached_path_for(post.file_url)) cp = str(cached_path_for(post.file_url))
if cp == self._preview._current_path: if cp == self._preview._current_path:
self._preview.clear() self._preview.clear()
if self._fullscreen_window and self._fullscreen_window.isVisible():
self._fullscreen_window._viewer.clear()
self._fullscreen_window._video.stop()
self._status.showMessage(f"Blacklisted: {tag}") self._status.showMessage(f"Blacklisted: {tag}")
self._do_search() self._do_search()
elif action == bl_post_action: elif action == bl_post_action:
self._db.add_blacklisted_post(post.file_url) self._db.add_blacklisted_post(post.file_url)
# Clear preview if this is the previewed post # Clear preview/slideshow if this is the previewed post
from ..core.cache import cached_path_for from ..core.cache import cached_path_for
cp = str(cached_path_for(post.file_url)) cp = str(cached_path_for(post.file_url))
if cp == self._preview._current_path: if cp == self._preview._current_path:
self._preview.clear() self._preview.clear()
if self._fullscreen_window and self._fullscreen_window.isVisible():
self._fullscreen_window._viewer.clear()
self._fullscreen_window._video.stop()
self._status.showMessage(f"Post #{post.id} blacklisted") self._status.showMessage(f"Post #{post.id} blacklisted")
self._do_search() self._do_search()