diff --git a/booru_viewer/gui/main_window.py b/booru_viewer/gui/main_window.py index 977d9a6..62d49a6 100644 --- a/booru_viewer/gui/main_window.py +++ b/booru_viewer/gui/main_window.py @@ -4,10 +4,7 @@ from __future__ import annotations import asyncio import logging -import os -import sys import threading -from pathlib import Path from PySide6.QtCore import Qt, QTimer, Signal, QUrl from PySide6.QtGui import QPixmap, QAction, QKeySequence, QDesktopServices, QShortcut @@ -28,8 +25,6 @@ from PySide6.QtWidgets import ( QProgressBar, ) -from dataclasses import field - from ..core.db import Database, Site from ..core.api.base import BooruClient, Post from ..core.api.detect import client_for_type @@ -982,7 +977,7 @@ class BooruApp(QMainWindow): self._open_post_id_in_browser(post.id) def _open_in_default(self, post: Post) -> None: - from ..core.cache import cached_path_for, is_cached + from ..core.cache import cached_path_for path = cached_path_for(post.file_url) if path.exists(): # Pause any playing video before opening externally