306 Commits

Author SHA1 Message Date
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
e59e405d73 v0.1.7 — Unified QMimeData clipboard across all tabs 2026-04-05 15:44:00 -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
pax
6524104008 Staggered infinite scroll — posts appear one at a time
Posts from infinite scroll are queued and added individually
with 50ms delay between each, creating a smooth flowing
appearance instead of 40 empty cells appearing at once.
2026-04-05 14:55:16 -05:00
pax
6f684bb491 Fix diagonal navigation — use viewport width for column count
FlowLayout.columns now reads the scroll area viewport width
instead of its own width, which can be stale after appending
posts or scrollbar visibility changes.
2026-04-05 14:52:28 -05:00
pax
2be7206879 Trigger infinite scroll earlier — one row from bottom
Fires reached_bottom when within one thumbnail row height of
the bottom instead of 10px, so new posts load before you
hit the very end.
2026-04-05 14:48:29 -05:00
pax
6e5b348ff7 Copy File to Clipboard everywhere, video support, wl-copy
- Renamed "Copy Image to Clipboard" to "Copy File to Clipboard"
- Works for images AND videos via wl-copy with correct MIME types
- Added to grid, preview, bookmarks, and library context menus
- Ctrl+C shortcut works globally
- Qt fallback for non-Wayland systems
2026-04-05 14:45:29 -05:00
pax
84b1e738ab Use wl-copy for clipboard on Wayland, Qt fallback on X11/Windows
Qt's clipboard doesn't work reliably on Wayland. Pipes the file
directly to wl-copy with correct MIME type. Falls back to
QApplication.clipboard().setPixmap() on other platforms.
2026-04-05 14:33:46 -05:00
pax
81d7a0c5d0 Fix copy to clipboard — check slideshow, grid selection, cached file
Tries in order: preview pixmap, slideshow pixmap, preview path,
selected post's cached file. Covers all states: normal preview,
slideshow open, video posts.
2026-04-05 14:31:52 -05:00
pax
84b49e4423 Fix Ctrl+C — use QShortcut instead of keyPressEvent
Grid widget was consuming the key event before it reached
the main window. QShortcut properly intercepts regardless
of which widget has focus.
2026-04-05 14:27:08 -05:00
pax
43a4e1e726 Fix copy to clipboard — fallback to cached path, always show option
- Ctrl+C tries pixmap then cached file path as fallback
- Preview right-click always shows "Copy Image to Clipboard"
- Works for images and loads from disk for videos
- Status bar shows result count with copy confirmation
2026-04-05 14:24:02 -05:00
pax
4e8cc97876 Keep result count in status bar when post loads 2026-04-05 14:19:39 -05:00
pax
6b2c42a239 Fix infinite scroll: stop at end, no page turn on arrow keys
- Track exhausted state — stop fetching when API has no more results
- Disable nav_past_end/nav_before_start in infinite scroll mode
- Disable page turn from _navigate_preview in infinite scroll mode
- Show "(end)" in status bar when all results loaded
- Reset exhausted flag on new search
2026-04-05 14:17:16 -05:00
pax
adef0fc86c Trigger prefetch on infinite scroll append 2026-04-05 14:05:29 -05:00
pax
ac2c15be29 Slideshow blacklist buttons, Ctrl+C copy, fix README code blocks
- BL Tag button in slideshow: opens categorized tag menu
- BL Post button in slideshow: blacklists current post
- Ctrl+C copies preview image to clipboard
- "Copy Image to Clipboard" in grid right-click menu
- Fix README code block formatting (missing closing backticks)
- Add ffmpeg back to Linux install deps
2026-04-05 14:04:15 -05:00
pax
04ffe5c602 Clear slideshow when blacklisting the previewed post 2026-04-05 13:53:35 -05:00
pax
9518f95a3c Clear preview only when the previewed post is blacklisted
Compare cached file path to determine if the right-clicked post
is the same one being previewed before clearing.
2026-04-05 13:49:20 -05:00
pax
df40a15093 Remove restart required from library directory label 2026-04-05 13:43:22 -05:00
pax
ed91f35975 Live settings apply — no restart needed for most settings
Infinite scroll, library dir, thumbnail size, rating, score
all apply immediately when saving settings.
2026-04-05 13:40:09 -05:00
pax
7115d34504 Infinite scroll mode — toggle in Settings > General
When enabled, hides prev/next buttons and loads more posts
automatically when scrolling to the bottom. Posts appended
to the grid, deduped against already-shown posts. Restart
required to toggle.
2026-04-05 13:37:38 -05:00
pax
78b7215467 Fix page label not updating when loading from cache 2026-04-05 13:28:15 -05:00
pax
63292aa9ba Cache page results — prev/next loads instantly from memory
Each page's results cached per search session. Going back to a
previous page loads from cache instead of re-fetching. Cache
cleared on new search.
2026-04-05 13:25:32 -05:00
pax
5bfc086931 Deduplicate posts across pages — backfilled posts don't repeat
Track shown post IDs across pages. Posts pulled from next page
via backfill won't appear again when navigating to that page.
Reset on new search.
2026-04-05 13:18:44 -05:00
pax
cd4efbcc45 Add backfill debug logging 2026-04-05 13:09:47 -05:00
pax
e515c19d05 Don't clear preview on blacklist — just re-search
Blacklisting a tag or post no longer clears the preview of an
unrelated post. The search reloads and the blacklisted post
simply disappears from the grid.
2026-04-05 13:05:17 -05:00
pax
396c008e9f Start prefetch from top on search, re-centers on post click 2026-04-05 12:59:58 -05:00
pax
e91d7d8a51 Prefetch in all 8 directions (ring expansion) not just linear
Expands outward in a grid-aware ring: left, right, up, down,
and all 4 diagonals at each distance level. Covers the page
more evenly.
2026-04-05 12:57:46 -05:00
pax
2156dec91d Spiral prefetch: gradually preloads entire page from clicked post
Expands outward from the selected post (±1, ±2, ±3...) with
200ms pacing between each download. Already-cached files skip
instantly. Setting renamed to "Prefetch whole page over time".
2026-04-05 12:47:57 -05:00
pax
09c4f56cbb Shorten prefetch checkbox label 2026-04-05 12:42:56 -05:00