Correct Stash box endpoint inputs (#4924)

* Use stashbox endpoint instead of index
* Update UI to not use deprecated fields
This commit is contained in:
WithoutPants
2024-06-11 13:14:12 +10:00
committed by GitHub
parent 94a978d063
commit ed057c971f
17 changed files with 234 additions and 185 deletions

View File

@@ -2054,19 +2054,21 @@ export const queryScrapeSceneQueryFragment = (
export const stashBoxSceneBatchQuery = (
sceneIds: string[],
stashBoxIndex: number
stashBoxEndpoint: string
) =>
client.query<GQL.ScrapeMultiScenesQuery>({
query: GQL.ScrapeMultiScenesDocument,
variables: {
source: {
stash_box_index: stashBoxIndex,
client.query<GQL.ScrapeMultiScenesQuery, GQL.ScrapeMultiScenesQueryVariables>(
{
query: GQL.ScrapeMultiScenesDocument,
variables: {
source: {
stash_box_endpoint: stashBoxEndpoint,
},
input: {
scene_ids: sceneIds,
},
},
input: {
scene_ids: sceneIds,
},
},
});
}
);
export const useListPerformerScrapers = () =>
GQL.useListPerformerScrapersQuery();
@@ -2110,13 +2112,16 @@ export const queryScrapePerformerURL = (url: string) =>
export const stashBoxPerformerQuery = (
searchVal: string,
stashBoxIndex: number
stashBoxEndpoint: string
) =>
client.query<GQL.ScrapeSinglePerformerQuery>({
client.query<
GQL.ScrapeSinglePerformerQuery,
GQL.ScrapeSinglePerformerQueryVariables
>({
query: GQL.ScrapeSinglePerformerDocument,
variables: {
source: {
stash_box_index: stashBoxIndex,
stash_box_endpoint: stashBoxEndpoint,
},
input: {
query: searchVal,
@@ -2127,13 +2132,16 @@ export const stashBoxPerformerQuery = (
export const stashBoxStudioQuery = (
query: string | null,
stashBoxIndex: number
stashBoxEndpoint: string
) =>
client.query<GQL.ScrapeSingleStudioQuery>({
client.query<
GQL.ScrapeSingleStudioQuery,
GQL.ScrapeSingleStudioQueryVariables
>({
query: GQL.ScrapeSingleStudioDocument,
variables: {
source: {
stash_box_index: stashBoxIndex,
stash_box_endpoint: stashBoxEndpoint,
},
input: {
query: query,