mirror of
https://github.com/stashapp/stash.git
synced 2026-01-08 08:37:55 +01:00
Submit all scene URLs to Stashbox (#5894)
This commit is contained in:
parent
00f5d0d984
commit
96d2b36a08
1 changed files with 4 additions and 5 deletions
|
|
@ -6,7 +6,6 @@ import (
|
|||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/stashapp/stash/pkg/logger"
|
||||
"github.com/stashapp/stash/pkg/models"
|
||||
|
|
@ -288,11 +287,11 @@ func newSceneDraftInput(d SceneDraft, endpoint string) graphql.SceneDraftInput {
|
|||
if scene.Director != "" {
|
||||
draft.Director = &scene.Director
|
||||
}
|
||||
// TODO - draft does not accept multiple URLs. Use single URL for now.
|
||||
if len(scene.URLs.List()) > 0 {
|
||||
url := strings.TrimSpace(scene.URLs.List()[0])
|
||||
draft.URL = &url
|
||||
draft.Urls = make([]string, len(scene.URLs.List()))
|
||||
for i, v := range scene.URLs.List() {
|
||||
draft.Urls[i] = v
|
||||
}
|
||||
|
||||
if scene.Date != nil {
|
||||
v := scene.Date.String()
|
||||
draft.Date = &v
|
||||
|
|
|
|||
Loading…
Reference in a new issue