Add image labels for performer images - #1215
Open
Maista6969 wants to merge 5 commits into
Open
Conversation
Maista6969
force-pushed
the
performer-image-labeling
branch
from
August 26, 2026 09:07
4de9294 to
a221ba4
Compare
Maista6969
force-pushed
the
performer-image-labeling
branch
from
August 27, 2026 10:53
a221ba4 to
7ea0859
Compare
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.
This PR provides two new features: performer images can be labeled and dated, and users of a stash-box can express their preferences for which images they'd like to see both when browsing and when scraping performers.
As discussed in #237 I opted for a closed taxonomy of types for the primary reason of compatibility: having a canonical set of labels for images means that users can use their preferences across multiple stash-boxes. Having users configure their preferences on the stash-box itself serves to simplify the rollout: if we had to rely on users configuring their preference in Stash then we'd need to coordinate releases, have Stash send an ordering whenever it scrapes a performer and also be more careful about backwards compatibility.
The taxonomy is intentionally wide because stash-box administrators can choose to disable the types they do not want to use for their labeling (maybe you think 3-quarters plus is excessive), and even disable entire groups (like dress because your instance doesn't have a lot of nude performers). When a label is disabled nothing is deleted: it is still present on any images that had it before the label was disabled, it is simply "inert" for the purposes of sorting images. Re-enabling the type brings the label back for all purposes.
There is an exception to the user-preferred ordering of images and that's search results, mostly because of their size: at such a small scale I believe we should prefer headshots since they stay readable at much smaller sizes. Performer images in search results will always use a face crop if the performer has one, otherwise it falls back to whatever it would have gotten before this feature was added. This affects the performer field in scene edit forms and the site-wide search in the top right corner of the app.
I believe this resolves:
For the reviewer(s):
This is a lot of code to review, so I've split the work into commits that can (hopefully) be reviewed in order. The very first commit adds new entries to
.gitattributesto help GitHub know which files are autogenerated so that they'll be collapsed in the diff view by default. This won't help this PR but for future work it should be helpful.I've added tests, integration tests and end-to-end playwright tests for this feature, and while they're bot-assisted I've seen each of them fail in my development environment so at least there are no duds in there.
AI Disclosure
I had Claude Opus look over the plan and assist with writing tests for this PR
Follow-up work