mirror of
https://github.com/stashapp/stash.git
synced 2025-12-16 20:07:05 +03:00
Correct Stash box endpoint inputs (#4924)
* Use stashbox endpoint instead of index * Update UI to not use deprecated fields
This commit is contained in:
@@ -251,12 +251,14 @@ func (c Client) findStashBoxScenesByFingerprints(ctx context.Context, scenes [][
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (c Client) SubmitStashBoxFingerprints(ctx context.Context, sceneIDs []string, endpoint string) (bool, error) {
|
||||
func (c Client) SubmitStashBoxFingerprints(ctx context.Context, sceneIDs []string) (bool, error) {
|
||||
ids, err := stringslice.StringSliceToIntSlice(sceneIDs)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
endpoint := c.box.Endpoint
|
||||
|
||||
var fingerprints []graphql.FingerprintSubmission
|
||||
|
||||
r := c.repository
|
||||
@@ -945,12 +947,13 @@ func appendFingerprintUnique(v []*graphql.FingerprintInput, toAdd *graphql.Finge
|
||||
return append(v, toAdd)
|
||||
}
|
||||
|
||||
func (c Client) SubmitSceneDraft(ctx context.Context, scene *models.Scene, endpoint string, cover []byte) (*string, error) {
|
||||
func (c Client) SubmitSceneDraft(ctx context.Context, scene *models.Scene, cover []byte) (*string, error) {
|
||||
draft := graphql.SceneDraftInput{}
|
||||
var image io.Reader
|
||||
r := c.repository
|
||||
pqb := r.Performer
|
||||
sqb := r.Studio
|
||||
endpoint := c.box.Endpoint
|
||||
|
||||
if scene.Title != "" {
|
||||
draft.Title = &scene.Title
|
||||
@@ -1115,10 +1118,11 @@ func (c Client) SubmitSceneDraft(ctx context.Context, scene *models.Scene, endpo
|
||||
// return id, nil
|
||||
}
|
||||
|
||||
func (c Client) SubmitPerformerDraft(ctx context.Context, performer *models.Performer, endpoint string) (*string, error) {
|
||||
func (c Client) SubmitPerformerDraft(ctx context.Context, performer *models.Performer) (*string, error) {
|
||||
draft := graphql.PerformerDraftInput{}
|
||||
var image io.Reader
|
||||
pqb := c.repository.Performer
|
||||
endpoint := c.box.Endpoint
|
||||
|
||||
if err := performer.LoadAliases(ctx, pqb); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user