Skip to content

Commit

Permalink
Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
elkorol committed Sep 24, 2023
1 parent 58b6ca3 commit 4d7f5a7
Show file tree
Hide file tree
Showing 14 changed files with 1,177 additions and 71 deletions.
7 changes: 7 additions & 0 deletions graphql/documents/queries/misc.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ query MarkerStrings($q: String, $sort: String) {
}
}

query AllGalleriesForFilter {
allGalleries {
id
title
}
}

query AllPerformersForFilter {
allPerformers {
id
Expand Down
3 changes: 3 additions & 0 deletions graphql/schema/types/scene.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ input BulkSceneUpdateInput {
performer_ids: BulkUpdateIds
tag_ids: BulkUpdateIds
movie_ids: BulkUpdateIds
"This should be a URL or a base64 encoded data URL"
cover_image: String
stash_ids: [StashIDInput!]
}

input SceneDestroyInput {
Expand Down
13 changes: 13 additions & 0 deletions internal/api/resolver_mutation_scene.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,15 @@ func (r *mutationResolver) BulkSceneUpdate(ctx context.Context, input BulkSceneU
}
}

var coverImageData []byte
if input.CoverImage != nil {
var err error
coverImageData, err = utils.ProcessImageInput(ctx, *input.CoverImage)
if err != nil {
return nil, err
}
}

ret := []*models.Scene{}

// Start the transaction and save the scenes
Expand All @@ -428,6 +437,10 @@ func (r *mutationResolver) BulkSceneUpdate(ctx context.Context, input BulkSceneU
return err
}

if err := r.sceneUpdateCoverImage(ctx, scene, coverImageData); err != nil {
return err
}

ret = append(ret, scene)
}

Expand Down
Loading

0 comments on commit 4d7f5a7

Please sign in to comment.