Correct Stash box endpoint inputs (#4924)

* Use stashbox endpoint instead of index
* Update UI to not use deprecated fields
This commit is contained in:
WithoutPants
2024-06-11 13:14:12 +10:00
committed by GitHub
parent 94a978d063
commit ed057c971f
17 changed files with 234 additions and 185 deletions

View File

@@ -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