mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Performer urls (#4958)
* Populate URLs from legacy fields * Return nil properly in xpath/json scrapers * Improve migration logging
This commit is contained in:
@@ -77,7 +77,7 @@ func createFullPerformer(id int, name string) *models.Performer {
|
||||
ID: id,
|
||||
Name: name,
|
||||
Disambiguation: disambiguation,
|
||||
URL: url,
|
||||
URLs: models.NewRelatedStrings([]string{url, twitter, instagram}),
|
||||
Aliases: models.NewRelatedStrings(aliases),
|
||||
Birthdate: &birthDate,
|
||||
CareerLength: careerLength,
|
||||
@@ -90,11 +90,9 @@ func createFullPerformer(id int, name string) *models.Performer {
|
||||
Favorite: true,
|
||||
Gender: &genderEnum,
|
||||
Height: &height,
|
||||
Instagram: instagram,
|
||||
Measurements: measurements,
|
||||
Piercings: piercings,
|
||||
Tattoos: tattoos,
|
||||
Twitter: twitter,
|
||||
CreatedAt: createTime,
|
||||
UpdatedAt: updateTime,
|
||||
Rating: &rating,
|
||||
@@ -114,6 +112,7 @@ func createEmptyPerformer(id int) models.Performer {
|
||||
CreatedAt: createTime,
|
||||
UpdatedAt: updateTime,
|
||||
Aliases: models.NewRelatedStrings([]string{}),
|
||||
URLs: models.NewRelatedStrings([]string{}),
|
||||
TagIDs: models.NewRelatedIDs([]int{}),
|
||||
StashIDs: models.NewRelatedStashIDs([]models.StashID{}),
|
||||
}
|
||||
@@ -123,7 +122,7 @@ func createFullJSONPerformer(name string, image string) *jsonschema.Performer {
|
||||
return &jsonschema.Performer{
|
||||
Name: name,
|
||||
Disambiguation: disambiguation,
|
||||
URL: url,
|
||||
URLs: []string{url, twitter, instagram},
|
||||
Aliases: aliases,
|
||||
Birthdate: birthDate.String(),
|
||||
CareerLength: careerLength,
|
||||
@@ -136,11 +135,9 @@ func createFullJSONPerformer(name string, image string) *jsonschema.Performer {
|
||||
Favorite: true,
|
||||
Gender: gender,
|
||||
Height: strconv.Itoa(height),
|
||||
Instagram: instagram,
|
||||
Measurements: measurements,
|
||||
Piercings: piercings,
|
||||
Tattoos: tattoos,
|
||||
Twitter: twitter,
|
||||
CreatedAt: json.JSONTime{
|
||||
Time: createTime,
|
||||
},
|
||||
@@ -161,6 +158,7 @@ func createFullJSONPerformer(name string, image string) *jsonschema.Performer {
|
||||
func createEmptyJSONPerformer() *jsonschema.Performer {
|
||||
return &jsonschema.Performer{
|
||||
Aliases: []string{},
|
||||
URLs: []string{},
|
||||
StashIDs: []models.StashID{},
|
||||
CreatedAt: json.JSONTime{
|
||||
Time: createTime,
|
||||
|
||||
Reference in New Issue
Block a user