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:
WeedLordVegeta420
2025-02-24 00:38:14 -05:00
committed by GitHub
parent b6ace42973
commit e97f647a43
27 changed files with 1063 additions and 11 deletions

View File

@@ -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,
];