mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Studio aliases (#1660)
* Add migration to create studio aliases table * Refactor studioQueryBuilder.Query to use filterBuilder * Expand GraphQL API with aliases support for studio * Add aliases support for studios to the UI * List aliases in details panel * Allow editing aliases in edit panel * Add 'aliases' filter when searching * Find studios by alias in filter / select * Add auto-tagging based on studio aliases * Support studio aliases for filename parsing * Support importing and exporting of studio aliases * Search for studio alias as well during scraping
This commit is contained in:
@@ -42,6 +42,13 @@ func ToJSON(reader models.StudioReader, studio *models.Studio) (*jsonschema.Stud
|
||||
newStudioJSON.Rating = int(studio.Rating.Int64)
|
||||
}
|
||||
|
||||
aliases, err := reader.GetAliases(studio.ID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error getting studio aliases: %s", err.Error())
|
||||
}
|
||||
|
||||
newStudioJSON.Aliases = aliases
|
||||
|
||||
image, err := reader.GetImage(studio.ID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error getting studio image: %s", err.Error())
|
||||
|
||||
Reference in New Issue
Block a user