mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Change performer height to be numeric (#3060)
* Make height an int. Add height_cm field * Change UI to use height_cm * Use number fields for height/weight * Add migration note
This commit is contained in:
@@ -3,6 +3,7 @@ package performer
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"github.com/stashapp/stash/pkg/models"
|
||||
"github.com/stashapp/stash/pkg/models/json"
|
||||
@@ -24,7 +25,6 @@ func ToJSON(ctx context.Context, reader ImageStashIDGetter, performer *models.Pe
|
||||
Ethnicity: performer.Ethnicity,
|
||||
Country: performer.Country,
|
||||
EyeColor: performer.EyeColor,
|
||||
Height: performer.Height,
|
||||
Measurements: performer.Measurements,
|
||||
FakeTits: performer.FakeTits,
|
||||
CareerLength: performer.CareerLength,
|
||||
@@ -50,6 +50,11 @@ func ToJSON(ctx context.Context, reader ImageStashIDGetter, performer *models.Pe
|
||||
if performer.DeathDate != nil {
|
||||
newPerformerJSON.DeathDate = performer.DeathDate.String()
|
||||
}
|
||||
|
||||
if performer.Height != nil {
|
||||
newPerformerJSON.Height = strconv.Itoa(*performer.Height)
|
||||
}
|
||||
|
||||
if performer.Weight != nil {
|
||||
newPerformerJSON.Weight = *performer.Weight
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user