mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Add Studio Code and Photographer to Galleries. (#4195)
* Added Studio Code and Photographer to Galleries * Fix gallery display on mobile * Fixed potential panic when scraping with a bad configuration --------- Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -43,7 +43,9 @@ func (r *mutationResolver) GalleryCreate(ctx context.Context, input GalleryCreat
|
||||
newGallery := models.NewGallery()
|
||||
|
||||
newGallery.Title = input.Title
|
||||
newGallery.Code = translator.string(input.Code)
|
||||
newGallery.Details = translator.string(input.Details)
|
||||
newGallery.Photographer = translator.string(input.Photographer)
|
||||
newGallery.Rating = input.Rating100
|
||||
|
||||
var err error
|
||||
@@ -182,7 +184,9 @@ func (r *mutationResolver) galleryUpdate(ctx context.Context, input models.Galle
|
||||
updatedGallery.Title = models.NewOptionalString(*input.Title)
|
||||
}
|
||||
|
||||
updatedGallery.Code = translator.optionalString(input.Code, "code")
|
||||
updatedGallery.Details = translator.optionalString(input.Details, "details")
|
||||
updatedGallery.Photographer = translator.optionalString(input.Photographer, "photographer")
|
||||
updatedGallery.Rating = translator.optionalInt(input.Rating100, "rating100")
|
||||
updatedGallery.Organized = translator.optionalBool(input.Organized, "organized")
|
||||
|
||||
@@ -257,7 +261,9 @@ func (r *mutationResolver) BulkGalleryUpdate(ctx context.Context, input BulkGall
|
||||
// Populate gallery from the input
|
||||
updatedGallery := models.NewGalleryPartial()
|
||||
|
||||
updatedGallery.Code = translator.optionalString(input.Code, "code")
|
||||
updatedGallery.Details = translator.optionalString(input.Details, "details")
|
||||
updatedGallery.Photographer = translator.optionalString(input.Photographer, "photographer")
|
||||
updatedGallery.Rating = translator.optionalInt(input.Rating100, "rating100")
|
||||
updatedGallery.Organized = translator.optionalBool(input.Organized, "organized")
|
||||
updatedGallery.URLs = translator.optionalURLsBulk(input.Urls, input.URL)
|
||||
|
||||
Reference in New Issue
Block a user