feat: add promoted tag badges, filter, and HereSphere thumbnails - #2241
Open
hjs0007 wants to merge 1 commit into
Open
feat: add promoted tag badges, filter, and HereSphere thumbnails#2241hjs0007 wants to merge 1 commit into
hjs0007 wants to merge 1 commit into
Conversation
Promoted tags let users mark tags that stand out across the library.
- Promoted tags: is_promoted column and scene_tags index (migrations
0088/0089), a TagResource API (/api/tag/list, /api/tag/promote/{id}),
an Options > Scene data > Tags management section, and is-primary
badges with a label icon on scene cards (capped per card size, +N
overflow badge with a tooltip).
- Has Promoted Tag filter: new scene Attributes entry mapped to an
exists() subquery, so the ! and & prefixes keep working.
- HereSphere thumbnails: the heatmap proxy is renamed to
HereSphereThumbnailProxy and serves heatmaps plus up to 3 mauve
pill badges (+N overflow) on the 700x420 thumbnail from a single
/imghs/ URL (/imghm/ kept for back-compat). A pure pkg/imgbadge
package draws them; the cache key includes tag names and script-file
identity so unpromoting or replacing funscripts invalidates stale
composites. The proxy cache dir is renamed to herespherethumbnailproxy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Promoted tags let users mark tags that stand out across the library.
Three subfeatures:
1. Promoted tags
New
is_promotedboolean column on tags (migrations0088-tag-is-promotedand0089-add-scene-tags-tag-id-index), includedin tag backups
New API:
GET /api/tag/list(with per-tag scene counts) andPOST /api/tag/promote/{id}New "Tags" management section under
Options > Scene data(searchable,paginated) to toggle promotion per tag
Scene cards render an
is-primarybadge with a label icon per promotedtag, capped per card size with a
+Noverflow badge (tooltip lists thehidden tag names)
2. Has Promoted Tag filter
server-fed from
/api/scene/filtersso no frontend change was needed;mapped to an
exists()subquery, so the!and&prefixes keepworking
3. HereSphere thumbnails
HeatmapThumbnailProxyrenamed toHereSphereThumbnailProxy; a single/imghs/URL serves heatmaps and promoted-tag badges on the 700x420thumbnail (
/imghm/kept for back-compat)New pure
pkg/imgbadgepackage draws up to 3 mauve pill badges plus a+Noverflow badge, dropping or truncating names to fit the canvasThe cache key includes the promoted tag names and script-file identity,
so unpromoting tags or replacing funscripts invalidates stale composites
Proxy cache dir renamed to
herespherethumbnailproxyNotes
Purely additive; no changes to existing scene list queries, scraping
flows, or backup format beyond the new field
Tested: 8 unit tests for
pkg/imgbadge, gofmt-clean