[Feature] Add configurable default performer gender #6867
Open
Stash-KennyG wants to merge 11 commits intostashapp:developfrom
Open
[Feature] Add configurable default performer gender #6867Stash-KennyG wants to merge 11 commits intostashapp:developfrom
Stash-KennyG wants to merge 11 commits intostashapp:developfrom
Conversation
added 4 commits
April 26, 2026 14:52
- Introduced `defaultPerformerGender` input and output fields in GraphQL schema. - Updated configuration resolver to handle default performer gender. - Implemented logic to use default performer gender when creating new performers or scraping data. - Added UI component for setting default performer gender in settings panel. - Updated localization for the new default performer gender option.
Wrap the config import in SettingsInterfacePanel to satisfy format-check in CI. Made-with: Cursor
Update SettingsInterfacePanel formatting to satisfy UI format-check in CI. Made-with: Cursor
Gykes
requested changes
Apr 28, 2026
Collaborator
Gykes
left a comment
There was a problem hiding this comment.
Just a quick overview. DogmaDragon will more than likely request that you update the manual to reflect this new setting so you may want to get ahead of it and add that too.
added 7 commits
April 30, 2026 19:47
`setConfigStrong` is a no op when the input pointer is nul. When the UI sends`null`, for when the user sets the setting back to no default, the old setting is saved. Was able to confirm this was testing. Selecting "none" in the dropdown keeps the previous setting saved and I think this is the issue. Built a helper or having the UI send "" instead of null could be possible solutions. - Updated GraphQL schema to clarify the behavior of `defaultPerformerGender`, allowing an empty string to clear the setting. - Implemented `applyDefaultPerformerGenderInput` function in the resolver to handle updates and clearing of the default performer gender. - Adjusted the settings panel to directly pass the value for `defaultPerformerGender`, simplifying the change handling. Made-with: Cursor
- Added a check for empty string input in `GetDefaultPerformerGender` to return nil if no gender is specified. - Implemented logging for invalid default performer gender values to improve debugging. This change ensures that the configuration correctly handles cases where the default performer gender is not set, enhancing the robustness of the application.
- Introduced a new utility function `withScrapedPerformerDefaultGender` to streamline the assignment of default gender when scraping performer data. - Replaced inline gender handling logic with the new utility function in both scraping results for new and existing performers, improving code readability and maintainability. This change enhances the clarity of gender assignment logic during performer data scraping.
- Added a section in the Configuration.md to explain the new default performer gender setting and its impact on performer data scraping. - Updated ScraperDevelopment.md to clarify how the default performer gender is applied when gender is not specified in scraped results. - Enhanced Scraping.md with details on how the default performer gender setting influences performer scraping. These changes improve the clarity and usability of the documentation regarding gender handling in the application.
- Updated GraphQL schema to change `defaultPerformerGender` type to `GenderEnum` and added a new field `clearDefaultPerformerGender` for clearing the setting. - Modified `applyDefaultPerformerGenderInput` function to accept the new input structure, allowing for clearer handling of gender updates and clearing. - Enhanced the `SettingsInterfacePanel` to implement the new logic for saving default performer gender, improving user experience when setting or clearing the default gender. These changes streamline the configuration process and improve the clarity of gender handling in the application.
- Updated the type definition in the `withScrapedPerformerDefaultGender` utility function to improve clarity and maintainability. - Ensured consistency in handling optional gender values for scraped performers. This change enhances the readability of the code related to default gender assignment during performer data processing.
Resolve the golangci-lint builtin name conflict and relax scraped performer helper typing so UI type-check passes when scraper gender is string-valued.
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.
Fixes #3751
Summary
defaultPerformerGender(None + all gender enum values)Backend
UI