138 Commits

Author SHA1 Message Date
pax
74f948a3e8 Speed up page loads — pre-fetch bookmarks/cache as sets, off-load PIL conversion to a worker 2026-04-07 11:36:23 -05:00
pax
2b9bf22249 Refresh popout BL Tag menu when navigating between bookmarked posts 2026-04-07 11:13:46 -05:00
pax
56cb5ce1df Scroll tilt navigates one cell/post in grid, preview, and popout 2026-04-07 08:50:13 -05:00
pax
2fbf2f6472 0.2.0: mpv backend, popout viewer, preview toolbar, API retry, SearchState refactor
Video:
- Replace Qt Multimedia with mpv via python-mpv + OpenGL render API
- Hardware-accelerated decoding, frame-accurate seeking, proper EOF detection
- Translucent overlay controls in both preview and popout
- LC_NUMERIC=C for mpv locale compatibility

Popout viewer (renamed from slideshow):
- Floating toolbar + controls overlay with auto-hide (2s)
- Window auto-resizes to content aspect ratio on navigation
- Hyprland: hyprctl resizewindowpixel + keep_aspect_ratio prop
- Window geometry persisted to DB across sessions
- Smart F11 exit sizing (60% monitor, centered)

Preview toolbar:
- Bookmark, Save, BL Tag, BL Post, Popout buttons above preview
- Save opens folder picker menu, shows Save/Unsave state
- Blacklist actions have confirmation dialogs
- Per-tab button visibility (Library: Save + Popout only)
- Cross-tab state management with grid selection clearing

Search & pagination:
- SearchState dataclass replaces 8 scattered attrs + defensive getattr
- Media type filter dropdown (All/Animated/Video/GIF/Audio)
- API retry with backoff on 429/503/timeout
- Infinite scroll dedup fix (local seen set per backfill round)
- Prev/Next buttons hide at boundaries, "(end)" status indicator

Grid:
- Rubber band drag selection
- Saved/bookmarked dots update instantly across all tabs
- Library/bookmarks emit signals on file deletion for cross-tab sync

Settings & misc:
- Default site option
- Max thumbnail cache setting (500MB default)
- Source URLs clickable in info panel
- Long URLs truncated to prevent splitter blowout
- Bulk save no longer auto-bookmarks
2026-04-06 13:43:46 -05:00
pax
bda92a0a87 Instant infinite scroll drain, trigger 3 rows early
Old staggered drain (50ms per post) was added for visual polish but
made infinite scroll painfully slow — a 40-post page took 2 seconds
just to add to the grid. Thumbnails already load async via _fetch_thumbnail,
so the stagger was just delaying grid population for no real benefit.

Now all posts are added instantly in one pass with thumbnails filling in
as they arrive. Scroll trigger widened from 1 row to 3 rows from bottom
so the next page starts loading before you reach the end.
2026-04-06 01:01:53 -05:00
pax
a93a8bc70f Pause video when opening in external application 2026-04-05 23:40:17 -05:00
pax
5f4af78e91 Apply saved thumbnail size on startup 2026-04-05 22:17:13 -05:00
pax
1ac3706e96 Trigger infinite scroll when splitter/resize removes scrollbar 2026-04-05 22:15:21 -05:00
pax
57475098e2 Fix infinite scroll not triggering when results don't fill viewport 2026-04-05 22:12:32 -05:00
pax
56b802b745 Simplify combobox dropdown styling — let Fusion draw its own arrow 2026-04-05 21:55:47 -05:00
pax
76acb8bb67 Fix combobox dropdown arrow styling on Windows dark mode 2026-04-05 21:48:58 -05:00
pax
8467c0696b Add post date to info line 2026-04-05 21:15:22 -05:00
pax
e22cde2a27 Add start-from-page field in top bar 2026-04-05 21:11:34 -05:00
pax
efc12e70ac Fix infinite scroll stopping early from false exhaustion 2026-04-05 21:08:19 -05:00
pax
e895f5e702 Match score button height to input box 2026-04-05 20:07:24 -05:00
pax
00613ae534 Fix score buttons under QSS — override padding inline
QSS themes set large padding (14px) on QPushButton which hides
the -/+ text in 25px buttons. Inline style overrides to 2px/6px.
2026-04-05 20:05:44 -05:00
pax
a6866d8c0b Revert "Widen score +/- buttons to 30px for QSS padding"
This reverts commit b549f5d8b3637d7019bc607efe58e4cb8ac89e4f.
2026-04-05 20:04:38 -05:00
pax
b549f5d8b3 Widen score +/- buttons to 30px for QSS padding 2026-04-05 20:03:33 -05:00
pax
d385b8acee Rename prefetch modes, cap Aggressive to 3 rows radius
- Adjacent → Nearby (4 cardinals)
- Full page → Aggressive (3 row radius ring, not entire grid)
- Prevents fetching 500 images in infinite scroll mode
2026-04-05 20:01:33 -05:00
pax
83bec9d649 Don't prefetch full images on infinite scroll drain
Infinite scroll only needs thumbnails (already fetched inline).
Full image prefetch only triggers on post click and initial search.
2026-04-05 19:56:27 -05:00
pax
0aa5d139d3 Prefetch modes: Off / Adjacent (4 cardinals) / Full page (spiral)
- Off: no prefetching
- Adjacent: simultaneous left/right/up/down (4 posts)
- Full page: ring expansion in all 8 directions
Dropdown in Settings > General replaces the old checkbox.
2026-04-05 19:55:21 -05:00
pax
81b609f55e Trigger cache eviction after infinite scroll page drain
Prevents unbounded cache growth during long infinite scroll
sessions. Runs after each batch of posts finishes loading.
2026-04-05 19:50:04 -05:00
pax
c93cd9b97c Animated filter: server-side tag only, remove client-side scanning
Uses 'animated' as a search tag (server handles it). Removed
client-side extension filter and backfill cap increases. Fast
and doesn't hit rate limits.
2026-04-05 19:20:25 -05:00
pax
d22547ad34 Animated filter: scan up to 50 pages, don't stop on short batches
Short API pages (< limit) no longer stop the scan when animated
filter is on — keeps looking through more pages. Only stops on
truly empty API response or 50 page cap.
2026-04-05 19:12:55 -05:00
pax
c035308030 Animated filter: client-side only, 20 page backfill cap
Removed server-side tag (wastes a search slot). Client-side
filter with 20 page backfill when animated is checked (vs 5
normally) to find enough animated posts.
2026-04-05 19:09:41 -05:00
pax
fe5dde7a2f Use 'animated' tag for all boorus — universal support 2026-04-05 19:07:06 -05:00
pax
33e10e8079 Animated filter: server-side filetype tag for full results
Danbooru/e621: filetype:gif,mp4,webm,zip
Gelbooru/Moebooru: animated tag
Client-side filter kept as fallback safety net.
2026-04-05 19:04:52 -05:00
pax
c577d7005a Add Animated checkbox — filters to only show video/gif/animated posts
Client-side filter by file extension. Works with backfill and
infinite scroll. Unchecked shows everything, checked shows only
gif/mp4/webm/mkv/mov/zip(ugoira).
2026-04-05 19:00:03 -05:00
pax
05e0a1783f Use - and + for score buttons instead of Unicode triangles 2026-04-05 18:41:39 -05:00
pax
8ebed2f281 Replace score spinbox arrows with side-by-side buttons
Hides QSpinBox arrows (break under QSS) and adds two separate
QPushButtons with triangle characters. Theme-friendly since
they're styled as normal buttons.
2026-04-05 18:27:14 -05:00
pax
602a71d534 Reset shared HTTP clients on startup to prevent event loop closed error
Cacheless mode closes the app while clients may still reference
the old event loop. Resetting to None on startup forces fresh
client creation on the new event loop.
2026-04-05 18:20:20 -05:00
pax
760dc290d8 Clear preview on new search 2026-04-05 17:52:15 -05:00
pax
ce92e6d57f Fix infinite scroll when content doesn't fill viewport
Detect when scrollbar max is 0 (no scroll needed) and auto-load
more posts. Checks after initial search and after each drain.
2026-04-05 17:35:01 -05:00
pax
21980fdbc7 Auto-load next page after drain if still at bottom 2026-04-05 17:27:33 -05:00
pax
4987765520 Code audit fixes: crash guards, memory caps, unused imports, bounds checks
- Fix pop(0) crash on empty append queue
- Cap page cache to 10 pages (pagination mode only)
- Bounds check before data[0] in gelbooru/moebooru get_post
- Move json import to top level in db.py
- Remove unused imports (Slot, contextmanager)
- Safe dict access in _row_to_bookmark
- Remove redundant datetime import in save_library_meta
- Add threading import for future DB locking
2026-04-05 17:18:27 -05:00
pax
d2aae5cd82 Store tag categories in bookmarks, tag click switches to Browse
- Bookmarks DB now stores tag_categories as JSON
- Migration adds column to existing favorites table
- Bookmark info panel uses stored categories directly
- Falls back to library_meta if bookmark has no categories
- Tag click in info panel: clears preview, switches to Browse, searches
2026-04-05 17:09:01 -05:00
pax
87c42f806e Fix library/bookmark info panel, save indicator, DB migration
- Migrate library_meta to add tag_categories column
- Info panel always updates (not gated on isVisible)
- Library info shows status bar with score/rating
- Save indicator: changed elif to if so Saved always triggers
- Bookmark info panel always populated
2026-04-05 16:58:22 -05:00
pax
29ffe0be7a Store tag categories in library metadata, unsave from bookmarks
- tag_categories stored as JSON in library_meta table
- Library and Bookmarks info panels show categorized tags
- Bookmarks falls back to library_meta for categories
- Added Unsave from Library to bookmarks right-click menu
2026-04-05 16:46:48 -05:00
pax
96740acb4c Show correct tags in info panel for Library and Bookmarks
Library looks up metadata from library_meta table by post ID.
Bookmarks creates a Post from the bookmark's stored tags/score/rating.
2026-04-05 16:39:39 -05:00
pax
337d5d8087 Library metadata: store tags on save, search by tag in Library
- library_meta table stores tags, score, rating, source per post
- Metadata saved automatically when saving from Browse
- Search box in Library tab filters by tags via DB lookup
- Works with all file types
2026-04-05 16:37:12 -05:00
pax
ea089075e6 Copy browse thumbnail to library cache on save
When saving a post to library, copies the booru preview thumbnail
to thumbnails/library/ so the Library tab shows it instantly
without needing to regenerate.
2026-04-05 16:28:53 -05:00
pax
4512cba629 Priority downloads — clicked post pauses prefetch
When a post is activated, prefetch pauses via asyncio.Event.
The clicked post downloads at full speed without competing.
Prefetch resumes after the download completes.
2026-04-05 16:26:29 -05:00
pax
ee9d06755f Connection pooling for thumbnails, wider score spinbox
Shared httpx.AsyncClient reuses TLS connections across thumbnail
downloads — avoids 40 separate TLS handshakes per page on Windows.
Score spinbox widened to 90px with explicit arrow buttons.
2026-04-05 16:19:10 -05:00
pax
7b6a9ab911 Use QMimeData for clipboard — same as drag and drop
Sets both file URL and image data on clipboard so it works
with file managers (paste as file) and image apps (paste as
image). No more wl-copy dependency for copying.
2026-04-05 15:40:16 -05:00
pax
a8da23ab1d Fix file URI clipboard — proper format with CRLF, no stray arg 2026-04-05 15:38:28 -05:00
pax
5c53ee7e87 Revert to native MIME types for clipboard copy 2026-04-05 15:36:33 -05:00
pax
f3152d138b Copy all images as PNG for universal clipboard compatibility 2026-04-05 15:34:32 -05:00
pax
813ee58fd3 Add debug logging for copy to clipboard 2026-04-05 15:31:42 -05:00
pax
0a9b57621d Blacklist removes from grid in-place, video copy as file URI
- Blacklisting a tag or post removes matching thumbnails from
  the grid without re-searching (preserves infinite scroll state)
- Video files copy as file:// URI so file managers can paste them
- Images still copy as raw data with correct MIME type
2026-04-05 15:24:27 -05:00
pax
cd3946c494 Fix infinite scroll loading multiple pages — lock until queue drained
Keep _loading=True during the entire staggered append process.
Only unlock after the last post is added to the grid, preventing
reached_bottom from triggering new fetches mid-drain.
2026-04-05 14:58:06 -05:00