diff --git a/graphql/documents/data/studio-slim.graphql b/graphql/documents/data/studio-slim.graphql index e42a284fd..a247b4e34 100644 --- a/graphql/documents/data/studio-slim.graphql +++ b/graphql/documents/data/studio-slim.graphql @@ -6,4 +6,7 @@ fragment SlimStudioData on Studio { endpoint stash_id } + parent_studio { + id + } } diff --git a/ui/v2.5/src/components/Tagger/StashSearchResult.tsx b/ui/v2.5/src/components/Tagger/StashSearchResult.tsx index 1a5717219..afffd934c 100755 --- a/ui/v2.5/src/components/Tagger/StashSearchResult.tsx +++ b/ui/v2.5/src/components/Tagger/StashSearchResult.tsx @@ -143,7 +143,7 @@ const StashSearchResult: React.FC = ({ studioID = studioCreateResult.data.studioCreate.id; } else if (studio.type === "update") { setSaveState("Saving studio stashID"); - const res = await updateStudioStashID(studio.data.id, [ + const res = await updateStudioStashID(studio.data, [ ...studio.data.stash_ids, { stash_id: scene.studio.stash_id, endpoint }, ]); @@ -284,6 +284,7 @@ const StashSearchResult: React.FC = ({ cover_image: imgData, url: scene.url, tag_ids: updatedTags, + rating: stashScene.rating, stash_ids: [ ...(stashScene?.stash_ids ?? []), { diff --git a/ui/v2.5/src/components/Tagger/queries.ts b/ui/v2.5/src/components/Tagger/queries.ts index 92f0e8379..98a685896 100644 --- a/ui/v2.5/src/components/Tagger/queries.ts +++ b/ui/v2.5/src/components/Tagger/queries.ts @@ -111,10 +111,14 @@ export const useUpdateStudioStashID = () => { onError: (errors) => errors, }); - const handleUpdate = (studioID: string, stashIDs: GQL.StashIdInput[]) => + const handleUpdate = ( + studio: GQL.SlimStudioDataFragment, + stashIDs: GQL.StashIdInput[] + ) => updateStudio({ variables: { - id: studioID, + id: studio.id, + parent_id: studio.parent_studio?.id, stash_ids: stashIDs.map((s) => ({ stash_id: s.stash_id, endpoint: s.endpoint,