mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Separate graphql API from rest of the system (#2503)
* Move graphql generated files to api * Refactor identify options * Remove models.StashBoxes * Move ScraperSource to scraper package * Rename field strategy enums * Rename identify.TaskOptions to Options
This commit is contained in:
@@ -54,12 +54,28 @@ type ExportTask struct {
|
||||
DownloadHash string
|
||||
}
|
||||
|
||||
type ExportObjectTypeInput struct {
|
||||
Ids []string `json:"ids"`
|
||||
All *bool `json:"all"`
|
||||
}
|
||||
|
||||
type ExportObjectsInput struct {
|
||||
Scenes *ExportObjectTypeInput `json:"scenes"`
|
||||
Images *ExportObjectTypeInput `json:"images"`
|
||||
Studios *ExportObjectTypeInput `json:"studios"`
|
||||
Performers *ExportObjectTypeInput `json:"performers"`
|
||||
Tags *ExportObjectTypeInput `json:"tags"`
|
||||
Movies *ExportObjectTypeInput `json:"movies"`
|
||||
Galleries *ExportObjectTypeInput `json:"galleries"`
|
||||
IncludeDependencies *bool `json:"includeDependencies"`
|
||||
}
|
||||
|
||||
type exportSpec struct {
|
||||
IDs []int
|
||||
all bool
|
||||
}
|
||||
|
||||
func newExportSpec(input *models.ExportObjectTypeInput) *exportSpec {
|
||||
func newExportSpec(input *ExportObjectTypeInput) *exportSpec {
|
||||
if input == nil {
|
||||
return &exportSpec{}
|
||||
}
|
||||
@@ -77,7 +93,7 @@ func newExportSpec(input *models.ExportObjectTypeInput) *exportSpec {
|
||||
return ret
|
||||
}
|
||||
|
||||
func CreateExportTask(a models.HashAlgorithm, input models.ExportObjectsInput) *ExportTask {
|
||||
func CreateExportTask(a models.HashAlgorithm, input ExportObjectsInput) *ExportTask {
|
||||
includeDeps := false
|
||||
if input.IncludeDependencies != nil {
|
||||
includeDeps = *input.IncludeDependencies
|
||||
|
||||
Reference in New Issue
Block a user