Feature: Support Multiple URLs in Studios (#6223)

* Backend support for studio URLs
* FrontEnd addition
* Support URLs in BulkStudioUpdate
* Update tagger modal for URLs
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
Gykes
2025-11-09 19:34:21 -08:00
committed by GitHub
parent 12a9a0b5f6
commit f434c1f529
33 changed files with 451 additions and 69 deletions

View File

@@ -217,7 +217,6 @@ func (i *Importer) Update(ctx context.Context, id int) error {
func studioJSONtoStudio(studioJSON jsonschema.Studio) models.Studio {
newStudio := models.Studio{
Name: studioJSON.Name,
URL: studioJSON.URL,
Aliases: models.NewRelatedStrings(studioJSON.Aliases),
Details: studioJSON.Details,
Favorite: studioJSON.Favorite,
@@ -229,6 +228,19 @@ func studioJSONtoStudio(studioJSON jsonschema.Studio) models.Studio {
StashIDs: models.NewRelatedStashIDs(studioJSON.StashIDs),
}
if len(studioJSON.URLs) > 0 {
newStudio.URLs = models.NewRelatedStrings(studioJSON.URLs)
} else {
urls := []string{}
if studioJSON.URL != "" {
urls = append(urls, studioJSON.URL)
}
if len(urls) > 0 {
newStudio.URLs = models.NewRelatedStrings(urls)
}
}
if studioJSON.Rating != 0 {
newStudio.Rating = &studioJSON.Rating
}