Submit all scene URLs to Stashbox (#5894)

This commit is contained in:
smith113-p
2025-06-02 20:05:43 -04:00
committed by GitHub
parent 00f5d0d984
commit 96d2b36a08

View File

@@ -6,7 +6,6 @@ import (
"errors" "errors"
"io" "io"
"net/http" "net/http"
"strings"
"github.com/stashapp/stash/pkg/logger" "github.com/stashapp/stash/pkg/logger"
"github.com/stashapp/stash/pkg/models" "github.com/stashapp/stash/pkg/models"
@@ -288,11 +287,11 @@ func newSceneDraftInput(d SceneDraft, endpoint string) graphql.SceneDraftInput {
if scene.Director != "" { if scene.Director != "" {
draft.Director = &scene.Director draft.Director = &scene.Director
} }
// TODO - draft does not accept multiple URLs. Use single URL for now. draft.Urls = make([]string, len(scene.URLs.List()))
if len(scene.URLs.List()) > 0 { for i, v := range scene.URLs.List() {
url := strings.TrimSpace(scene.URLs.List()[0]) draft.Urls[i] = v
draft.URL = &url
} }
if scene.Date != nil { if scene.Date != nil {
v := scene.Date.String() v := scene.Date.String()
draft.Date = &v draft.Date = &v