diff --git a/pkg/scraper/stashbox/graphql/generated_client.go b/pkg/scraper/stashbox/graphql/generated_client.go index 88c22647118..b87d70343fa 100644 --- a/pkg/scraper/stashbox/graphql/generated_client.go +++ b/pkg/scraper/stashbox/graphql/generated_client.go @@ -247,29 +247,10 @@ const FindSceneByFingerprintDocument = `query FindSceneByFingerprint ($fingerpri ... SceneFragment } } -fragment StudioFragment on Studio { - name - id - urls { - ... URLFragment - } - parent { - name - id - } - images { - ... ImageFragment - } -} -fragment BodyModificationFragment on BodyModification { - location - description -} -fragment MeasurementsFragment on Measurements { - band_size - cup_size - waist - hip +fragment FingerprintFragment on Fingerprint { + algorithm + hash + duration } fragment SceneFragment on Scene { id @@ -298,10 +279,6 @@ fragment SceneFragment on Scene { ... FingerprintFragment } } -fragment URLFragment on URL { - url - type -} fragment ImageFragment on Image { id url @@ -312,6 +289,32 @@ fragment TagFragment on Tag { name id } +fragment FuzzyDateFragment on FuzzyDate { + date + accuracy +} +fragment BodyModificationFragment on BodyModification { + location + description +} +fragment URLFragment on URL { + url + type +} +fragment StudioFragment on Studio { + name + id + urls { + ... URLFragment + } + parent { + name + id + } + images { + ... ImageFragment + } +} fragment PerformerAppearanceFragment on PerformerAppearance { as performer { @@ -352,14 +355,11 @@ fragment PerformerFragment on Performer { ... BodyModificationFragment } } -fragment FuzzyDateFragment on FuzzyDate { - date - accuracy -} -fragment FingerprintFragment on Fingerprint { - algorithm - hash - duration +fragment MeasurementsFragment on Measurements { + band_size + cup_size + waist + hip } ` @@ -381,47 +381,31 @@ const FindScenesByFullFingerprintsDocument = `query FindScenesByFullFingerprints ... SceneFragment } } -fragment FuzzyDateFragment on FuzzyDate { - date - accuracy -} fragment MeasurementsFragment on Measurements { band_size cup_size waist hip } -fragment BodyModificationFragment on BodyModification { - location - description -} fragment FingerprintFragment on Fingerprint { algorithm hash duration } -fragment URLFragment on URL { - url - type -} fragment ImageFragment on Image { id url width height } -fragment StudioFragment on Studio { +fragment TagFragment on Tag { name id - urls { - ... URLFragment - } - parent { - name - id - } - images { - ... ImageFragment +} +fragment PerformerAppearanceFragment on PerformerAppearance { + as + performer { + ... PerformerFragment } } fragment PerformerFragment on Performer { @@ -458,6 +442,14 @@ fragment PerformerFragment on Performer { ... BodyModificationFragment } } +fragment FuzzyDateFragment on FuzzyDate { + date + accuracy +} +fragment BodyModificationFragment on BodyModification { + location + description +} fragment SceneFragment on Scene { id title @@ -485,14 +477,22 @@ fragment SceneFragment on Scene { ... FingerprintFragment } } -fragment TagFragment on Tag { +fragment URLFragment on URL { + url + type +} +fragment StudioFragment on Studio { name id -} -fragment PerformerAppearanceFragment on PerformerAppearance { - as - performer { - ... PerformerFragment + urls { + ... URLFragment + } + parent { + name + id + } + images { + ... ImageFragment } } ` @@ -515,9 +515,11 @@ const FindScenesBySceneFingerprintsDocument = `query FindScenesBySceneFingerprin ... SceneFragment } } -fragment URLFragment on URL { +fragment ImageFragment on Image { + id url - type + width + height } fragment TagFragment on Tag { name @@ -529,48 +531,24 @@ fragment PerformerAppearanceFragment on PerformerAppearance { ... PerformerFragment } } -fragment FuzzyDateFragment on FuzzyDate { - date - accuracy -} fragment MeasurementsFragment on Measurements { band_size cup_size waist hip } -fragment SceneFragment on Scene { - id - title - code - details - director +fragment BodyModificationFragment on BodyModification { + location + description +} +fragment FingerprintFragment on Fingerprint { + algorithm + hash duration - date - urls { - ... URLFragment - } - images { - ... ImageFragment - } - studio { - ... StudioFragment - } - tags { - ... TagFragment - } - performers { - ... PerformerAppearanceFragment - } - fingerprints { - ... FingerprintFragment - } } -fragment ImageFragment on Image { - id +fragment URLFragment on URL { url - width - height + type } fragment StudioFragment on Studio { name @@ -620,14 +598,36 @@ fragment PerformerFragment on Performer { ... BodyModificationFragment } } -fragment BodyModificationFragment on BodyModification { - location - description +fragment FuzzyDateFragment on FuzzyDate { + date + accuracy } -fragment FingerprintFragment on Fingerprint { - algorithm - hash +fragment SceneFragment on Scene { + id + title + code + details + director duration + date + urls { + ... URLFragment + } + images { + ... ImageFragment + } + studio { + ... StudioFragment + } + tags { + ... TagFragment + } + performers { + ... PerformerAppearanceFragment + } + fingerprints { + ... FingerprintFragment + } } ` @@ -649,29 +649,6 @@ const SearchSceneDocument = `query SearchScene ($term: String!) { ... SceneFragment } } -fragment ImageFragment on Image { - id - url - width - height -} -fragment TagFragment on Tag { - name - id -} -fragment FuzzyDateFragment on FuzzyDate { - date - accuracy -} -fragment BodyModificationFragment on BodyModification { - location - description -} -fragment FingerprintFragment on Fingerprint { - algorithm - hash - duration -} fragment SceneFragment on Scene { id title @@ -699,10 +676,37 @@ fragment SceneFragment on Scene { ... FingerprintFragment } } +fragment PerformerAppearanceFragment on PerformerAppearance { + as + performer { + ... PerformerFragment + } +} +fragment FuzzyDateFragment on FuzzyDate { + date + accuracy +} +fragment MeasurementsFragment on Measurements { + band_size + cup_size + waist + hip +} +fragment FingerprintFragment on Fingerprint { + algorithm + hash + duration +} fragment URLFragment on URL { url type } +fragment ImageFragment on Image { + id + url + width + height +} fragment StudioFragment on Studio { name id @@ -717,11 +721,9 @@ fragment StudioFragment on Studio { ... ImageFragment } } -fragment PerformerAppearanceFragment on PerformerAppearance { - as - performer { - ... PerformerFragment - } +fragment TagFragment on Tag { + name + id } fragment PerformerFragment on Performer { id @@ -757,11 +759,9 @@ fragment PerformerFragment on Performer { ... BodyModificationFragment } } -fragment MeasurementsFragment on Measurements { - band_size - cup_size - waist - hip +fragment BodyModificationFragment on BodyModification { + location + description } ` @@ -783,10 +783,6 @@ const SearchPerformerDocument = `query SearchPerformer ($term: String!) { ... PerformerFragment } } -fragment BodyModificationFragment on BodyModification { - location - description -} fragment PerformerFragment on Performer { id name @@ -841,6 +837,10 @@ fragment MeasurementsFragment on Measurements { waist hip } +fragment BodyModificationFragment on BodyModification { + location + description +} ` func (c *Client) SearchPerformer(ctx context.Context, term string, httpRequestOptions ...client.HTTPRequestOption) (*SearchPerformer, error) { @@ -861,6 +861,26 @@ const FindPerformerByIDDocument = `query FindPerformerByID ($id: ID!) { ... PerformerFragment } } +fragment ImageFragment on Image { + id + url + width + height +} +fragment FuzzyDateFragment on FuzzyDate { + date + accuracy +} +fragment MeasurementsFragment on Measurements { + band_size + cup_size + waist + hip +} +fragment BodyModificationFragment on BodyModification { + location + description +} fragment PerformerFragment on Performer { id name @@ -899,26 +919,6 @@ fragment URLFragment on URL { url type } -fragment ImageFragment on Image { - id - url - width - height -} -fragment FuzzyDateFragment on FuzzyDate { - date - accuracy -} -fragment MeasurementsFragment on Measurements { - band_size - cup_size - waist - hip -} -fragment BodyModificationFragment on BodyModification { - location - description -} ` func (c *Client) FindPerformerByID(ctx context.Context, id string, httpRequestOptions ...client.HTTPRequestOption) (*FindPerformerByID, error) { @@ -939,12 +939,6 @@ const FindSceneByIDDocument = `query FindSceneByID ($id: ID!) { ... SceneFragment } } -fragment ImageFragment on Image { - id - url - width - height -} fragment StudioFragment on Studio { name id @@ -963,6 +957,31 @@ fragment TagFragment on Tag { name id } +fragment PerformerAppearanceFragment on PerformerAppearance { + as + performer { + ... PerformerFragment + } +} +fragment FuzzyDateFragment on FuzzyDate { + date + accuracy +} +fragment FingerprintFragment on Fingerprint { + algorithm + hash + duration +} +fragment ImageFragment on Image { + id + url + width + height +} +fragment URLFragment on URL { + url + type +} fragment PerformerFragment on Performer { id name @@ -1003,6 +1022,10 @@ fragment MeasurementsFragment on Measurements { waist hip } +fragment BodyModificationFragment on BodyModification { + location + description +} fragment SceneFragment on Scene { id title @@ -1030,29 +1053,6 @@ fragment SceneFragment on Scene { ... FingerprintFragment } } -fragment URLFragment on URL { - url - type -} -fragment BodyModificationFragment on BodyModification { - location - description -} -fragment FingerprintFragment on Fingerprint { - algorithm - hash - duration -} -fragment PerformerAppearanceFragment on PerformerAppearance { - as - performer { - ... PerformerFragment - } -} -fragment FuzzyDateFragment on FuzzyDate { - date - accuracy -} ` func (c *Client) FindSceneByID(ctx context.Context, id string, httpRequestOptions ...client.HTTPRequestOption) (*FindSceneByID, error) { diff --git a/pkg/scraper/stashbox/graphql/generated_models.go b/pkg/scraper/stashbox/graphql/generated_models.go index 54a9deb2554..780419fadea 100644 --- a/pkg/scraper/stashbox/graphql/generated_models.go +++ b/pkg/scraper/stashbox/graphql/generated_models.go @@ -88,8 +88,8 @@ type DraftEntity struct { ID *string `json:"id,omitempty"` } -func (DraftEntity) IsSceneDraftTag() {} func (DraftEntity) IsSceneDraftStudio() {} +func (DraftEntity) IsSceneDraftTag() {} func (DraftEntity) IsSceneDraftPerformer() {} type DraftEntityInput struct { @@ -339,7 +339,7 @@ type Performer struct { Deleted bool `json:"deleted"` Edits []*Edit `json:"edits,omitempty"` SceneCount int `json:"scene_count"` - OCounter int `json:"o_counter"` + Scenes []*Scene `json:"scenes,omitempty"` MergedIds []string `json:"merged_ids,omitempty"` Studios []*PerformerStudio `json:"studios,omitempty"` IsFavorite bool `json:"is_favorite"` @@ -347,8 +347,8 @@ type Performer struct { Updated time.Time `json:"updated"` } -func (Performer) IsSceneDraftPerformer() {} func (Performer) IsEditTarget() {} +func (Performer) IsSceneDraftPerformer() {} type PerformerAppearance struct { Performer *Performer `json:"performer,omitempty"` @@ -394,6 +394,7 @@ type PerformerDestroyInput struct { type PerformerDraft struct { ID *string `json:"id,omitempty"` Name string `json:"name"` + Disambiguation *string `json:"disambiguation,omitempty"` Aliases *string `json:"aliases,omitempty"` Gender *string `json:"gender,omitempty"` Birthdate *string `json:"birthdate,omitempty"` @@ -416,6 +417,7 @@ func (PerformerDraft) IsDraftData() {} type PerformerDraftInput struct { ID *string `json:"id,omitempty"` + Disambiguation *string `json:"disambiguation,omitempty"` Name string `json:"name"` Aliases *string `json:"aliases,omitempty"` Gender *string `json:"gender,omitempty"` @@ -962,8 +964,8 @@ type Tag struct { Updated time.Time `json:"updated"` } -func (Tag) IsSceneDraftTag() {} func (Tag) IsEditTarget() {} +func (Tag) IsSceneDraftTag() {} type TagCategory struct { ID string `json:"id"` @@ -1797,7 +1799,6 @@ const ( PerformerSortEnumName PerformerSortEnum = "NAME" PerformerSortEnumBirthdate PerformerSortEnum = "BIRTHDATE" PerformerSortEnumSceneCount PerformerSortEnum = "SCENE_COUNT" - PerformerSortEnumOCounter PerformerSortEnum = "O_COUNTER" PerformerSortEnumCareerStartYear PerformerSortEnum = "CAREER_START_YEAR" PerformerSortEnumDebut PerformerSortEnum = "DEBUT" PerformerSortEnumLastScene PerformerSortEnum = "LAST_SCENE" @@ -1809,7 +1810,6 @@ var AllPerformerSortEnum = []PerformerSortEnum{ PerformerSortEnumName, PerformerSortEnumBirthdate, PerformerSortEnumSceneCount, - PerformerSortEnumOCounter, PerformerSortEnumCareerStartYear, PerformerSortEnumDebut, PerformerSortEnumLastScene, @@ -1819,7 +1819,7 @@ var AllPerformerSortEnum = []PerformerSortEnum{ func (e PerformerSortEnum) IsValid() bool { switch e { - case PerformerSortEnumName, PerformerSortEnumBirthdate, PerformerSortEnumSceneCount, PerformerSortEnumOCounter, PerformerSortEnumCareerStartYear, PerformerSortEnumDebut, PerformerSortEnumCreatedAt, PerformerSortEnumUpdatedAt: + case PerformerSortEnumName, PerformerSortEnumBirthdate, PerformerSortEnumSceneCount, PerformerSortEnumCareerStartYear, PerformerSortEnumDebut, PerformerSortEnumLastScene, PerformerSortEnumCreatedAt, PerformerSortEnumUpdatedAt: return true } return false diff --git a/pkg/scraper/stashbox/stash_box.go b/pkg/scraper/stashbox/stash_box.go index 7abff7032e2..38fd34e8ac1 100644 --- a/pkg/scraper/stashbox/stash_box.go +++ b/pkg/scraper/stashbox/stash_box.go @@ -1101,10 +1101,9 @@ func (c Client) SubmitPerformerDraft(ctx context.Context, performer *models.Perf if performer.Name != "" { draft.Name = performer.Name } - // stash-box does not support Disambiguation currently - // if performer.Disambiguation != "" { - // draft.Disambiguation = performer.Disambiguation - // } + if performer.Disambiguation != "" { + draft.Disambiguation = &performer.Disambiguation + } if performer.Birthdate != nil { d := performer.Birthdate.String() draft.Birthdate = &d