mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Add penis length and circumcision stats to performers. (#3627)
* Add penis length stat to performers. * Modified the UI to display and edit the stat. * Added the ability to filter floats to allow filtering by penis length. * Add circumcision stat to performer. * Refactor enum filtering * Change boolean filter to radio buttons * Return null for empty enum values --------- Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -1331,6 +1331,29 @@ func getPerformerCareerLength(index int) *string {
|
||||
return &ret
|
||||
}
|
||||
|
||||
func getPerformerPenisLength(index int) *float64 {
|
||||
if index%5 == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
ret := float64(index)
|
||||
return &ret
|
||||
}
|
||||
|
||||
func getPerformerCircumcised(index int) *models.CircumisedEnum {
|
||||
var ret models.CircumisedEnum
|
||||
switch {
|
||||
case index%3 == 0:
|
||||
return nil
|
||||
case index%3 == 1:
|
||||
ret = models.CircumisedEnumCut
|
||||
default:
|
||||
ret = models.CircumisedEnumUncut
|
||||
}
|
||||
|
||||
return &ret
|
||||
}
|
||||
|
||||
func getIgnoreAutoTag(index int) bool {
|
||||
return index%5 == 0
|
||||
}
|
||||
@@ -1372,6 +1395,8 @@ func createPerformers(ctx context.Context, n int, o int) error {
|
||||
DeathDate: getPerformerDeathDate(i),
|
||||
Details: getPerformerStringValue(i, "Details"),
|
||||
Ethnicity: getPerformerStringValue(i, "Ethnicity"),
|
||||
PenisLength: getPerformerPenisLength(i),
|
||||
Circumcised: getPerformerCircumcised(i),
|
||||
Rating: getIntPtr(getRating(i)),
|
||||
IgnoreAutoTag: getIgnoreAutoTag(i),
|
||||
TagIDs: models.NewRelatedIDs(tids),
|
||||
|
||||
Reference in New Issue
Block a user