mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Add Image Scraping (#5562)
Co-authored-by: keenbed <155155956+keenbed@users.noreply.github.com> Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b6ace42973
commit
e97f647a43
@@ -2291,6 +2291,8 @@ export const queryScrapeGroupURL = (url: string) =>
|
||||
|
||||
export const useListGalleryScrapers = () => GQL.useListGalleryScrapersQuery();
|
||||
|
||||
export const useListImageScrapers = () => GQL.useListImageScrapersQuery();
|
||||
|
||||
export const queryScrapeGallery = (scraperId: string, galleryId: string) =>
|
||||
client.query<GQL.ScrapeSingleGalleryQuery>({
|
||||
query: GQL.ScrapeSingleGalleryDocument,
|
||||
@@ -2312,6 +2314,27 @@ export const queryScrapeGalleryURL = (url: string) =>
|
||||
fetchPolicy: "network-only",
|
||||
});
|
||||
|
||||
export const queryScrapeImage = (scraperId: string, imageId: string) =>
|
||||
client.query<GQL.ScrapeSingleImageQuery>({
|
||||
query: GQL.ScrapeSingleImageDocument,
|
||||
variables: {
|
||||
source: {
|
||||
scraper_id: scraperId,
|
||||
},
|
||||
input: {
|
||||
image_id: imageId,
|
||||
},
|
||||
},
|
||||
fetchPolicy: "network-only",
|
||||
});
|
||||
|
||||
export const queryScrapeImageURL = (url: string) =>
|
||||
client.query<GQL.ScrapeImageUrlQuery>({
|
||||
query: GQL.ScrapeImageUrlDocument,
|
||||
variables: { url },
|
||||
fetchPolicy: "network-only",
|
||||
});
|
||||
|
||||
export const mutateSubmitStashBoxSceneDraft = (
|
||||
input: GQL.StashBoxDraftSubmissionInput
|
||||
) =>
|
||||
@@ -2383,6 +2406,7 @@ export const scraperMutationImpactedQueries = [
|
||||
GQL.ListGroupScrapersDocument,
|
||||
GQL.ListPerformerScrapersDocument,
|
||||
GQL.ListSceneScrapersDocument,
|
||||
GQL.ListImageScrapersDocument,
|
||||
GQL.InstalledScraperPackagesDocument,
|
||||
GQL.InstalledScraperPackagesStatusDocument,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user