mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Include database cover in draft submission if filesystem version not present (#3465)
* Fix styling of stash-box dropdown * Use cover blob in draft submission if present
This commit is contained in:
@@ -58,9 +58,16 @@ func (r *mutationResolver) SubmitStashBoxSceneDraft(ctx context.Context, input S
|
||||
return err
|
||||
}
|
||||
|
||||
filepath := manager.GetInstance().Paths.Scene.GetScreenshotPath(scene.GetHash(config.GetInstance().GetVideoFileNamingAlgorithm()))
|
||||
if scene == nil {
|
||||
return fmt.Errorf("scene with id %d not found", id)
|
||||
}
|
||||
|
||||
res, err = client.SubmitSceneDraft(ctx, scene, boxes[input.StashBoxIndex].Endpoint, filepath)
|
||||
cover, err := r.sceneService.GetCover(ctx, scene)
|
||||
if err != nil {
|
||||
return fmt.Errorf("getting scene cover: %w", err)
|
||||
}
|
||||
|
||||
res, err = client.SubmitSceneDraft(ctx, scene, boxes[input.StashBoxIndex].Endpoint, cover)
|
||||
return err
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user