mirror of
https://github.com/stashapp/stash.git
synced 2025-12-16 20:07:05 +03:00
Submit all scene URLs to Stashbox (#5894)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user