From 192397f1ec168afe331ed22b182b08690ab3cf05 Mon Sep 17 00:00:00 2001 From: pax Date: Sun, 5 Apr 2026 03:13:00 -0500 Subject: [PATCH] Pre-release fixes for v0.1.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix Library slideshow navigation (was falling through to Browse) - Fix bookmarks import signal using wrong variable name - Fix "Favoriting" status message → "Bookmarking" - Rename FavThumbSignals → BookmarkThumbSignals - Update README: all Favorite→Bookmark, add Library section - Add Library tab to keybinds documentation --- README.md | 20 ++++++++++++++------ booru_viewer/gui/app.py | 12 ++++++++++-- booru_viewer/gui/bookmarks.py | 6 +++--- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1c7af8a..d19b115 100644 --- a/README.md +++ b/README.md @@ -48,18 +48,26 @@ Supports custom styling via `custom.qss` — see [Theming](#theming). - Right-click preview → "Slideshow Mode" for fullscreen viewing - Arrow keys / `h`/`j`/`k`/`l` navigate posts (including during video playback) - `,` / `.` seek 5 seconds in videos, `Space` toggles play/pause -- Toolbar with Favorite and Save/Unsave toggle buttons showing current state +- Toolbar with Bookmark and Save/Unsave toggle buttons showing current state - `F11` toggles fullscreen/windowed, `Ctrl+H` hides all UI - Bidirectional sync — clicking posts in the main grid updates the slideshow - Page boundary navigation — past the last/first post loads next/prev page -### Favorites & Library -- Favorite posts, organize into folders +### Bookmarks & Library +- Bookmark posts, organize into folders +- Three-tab layout: Browse, Bookmarks, and Library - Save to library (unsorted or per-folder), drag-and-drop thumbnails as files - Multi-select (Ctrl/Shift+Click, Ctrl+A) with bulk actions -- Bulk context menus in both Browse and Favorites tabs +- Bulk context menus in both Browse and Bookmarks tabs - Unsave from Library available in grid, preview, and slideshow -- Import/export favorites as JSON +- Import/export bookmarks as JSON + +### Library +- Dedicated tab for browsing saved files on disk +- Folder sidebar with configurable library directory +- Sort by date, name, or size +- FFmpeg-based video thumbnail generation +- Missing file detection for removed or relocated media ### Search - Inline history dropdown inside the search bar @@ -115,7 +123,7 @@ Windows 10 dark mode is automatically detected and applied. | Left / Right | Previous / next post | | `,` / `.` | Seek 5s back / forward (video) | | `Space` | Play / pause (video) | -| Right click | Context menu (favorite, save, slideshow) | +| Right click | Context menu (bookmark, save, slideshow) | ### Slideshow diff --git a/booru_viewer/gui/app.py b/booru_viewer/gui/app.py index 516ebaa..45bac68 100644 --- a/booru_viewer/gui/app.py +++ b/booru_viewer/gui/app.py @@ -1023,6 +1023,14 @@ class BooruApp(QMainWindow): if 0 <= idx < len(favs): grid._select(idx) self._on_bookmark_activated(favs[idx]) + elif self._stack.currentIndex() == 2: + # Library view + grid = self._library_view._grid + files = self._library_view._files + idx = grid.selected_index + direction + if 0 <= idx < len(files): + grid._select(idx) + self._library_view.file_activated.emit(str(files[idx])) else: idx = self._grid.selected_index + direction log.info(f"Navigate: direction={direction} current={self._grid.selected_index} next={idx} total={len(self._posts)}") @@ -1328,7 +1336,7 @@ class BooruApp(QMainWindow): site_id = self._site_combo.currentData() if not site_id: return - self._status.showMessage(f"Favoriting {len(posts)}...") + self._status.showMessage(f"Bookmarking {len(posts)}...") async def _do(): for i, (idx, post) in enumerate(zip(indices, posts)): @@ -1544,7 +1552,7 @@ class BooruApp(QMainWindow): dlg = SettingsDialog(self._db, self) dlg.settings_changed.connect(self._apply_settings) self._bookmarks_imported = False - dlg.bookmarks_imported.connect(lambda: setattr(self, '_favorites_imported', True)) + dlg.bookmarks_imported.connect(lambda: setattr(self, '_bookmarks_imported', True)) dlg.exec() if self._bookmarks_imported: self._switch_view(1) diff --git a/booru_viewer/gui/bookmarks.py b/booru_viewer/gui/bookmarks.py index e129797..c3689a1 100644 --- a/booru_viewer/gui/bookmarks.py +++ b/booru_viewer/gui/bookmarks.py @@ -30,7 +30,7 @@ from .grid import ThumbnailGrid log = logging.getLogger("booru") -class FavThumbSignals(QObject): +class BookmarkThumbSignals(QObject): thumb_ready = Signal(int, str) @@ -44,7 +44,7 @@ class BookmarksView(QWidget): super().__init__(parent) self._db = db self._bookmarks: list[Bookmark] = [] - self._signals = FavThumbSignals() + self._signals = BookmarkThumbSignals() self._signals.thumb_ready.connect(self._on_thumb_ready, Qt.ConnectionType.QueuedConnection) layout = QVBoxLayout(self) @@ -156,7 +156,7 @@ class BookmarksView(QWidget): path = await download_thumbnail(url) self._signals.thumb_ready.emit(index, str(path)) except Exception as e: - log.warning(f"Fav thumb {index} failed: {e}") + log.warning(f"Bookmark thumb {index} failed: {e}") threading.Thread(target=lambda: asyncio.run(_dl()), daemon=True).start() def _on_thumb_ready(self, index: int, path: str) -> None: