mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Fix identify and script scraper bugs (#2375)
* Continue identify if source fails * Handle empty result set correctly * Parse null values from scraper script correctly * Omit warning when json selector value missing * Return nil when scraped item not found * Fix graphql validation errors
This commit is contained in:
@@ -221,10 +221,14 @@ func (r *queryResolver) ScrapeSingleScene(ctx context.Context, source models.Scr
|
||||
return nil, fmt.Errorf("%w: sceneID is not an integer: '%s'", ErrInput, *input.SceneID)
|
||||
}
|
||||
c, err = r.scraperCache().ScrapeID(ctx, *source.ScraperID, sceneID, models.ScrapeContentTypeScene)
|
||||
content = []models.ScrapedContent{c}
|
||||
if c != nil {
|
||||
content = []models.ScrapedContent{c}
|
||||
}
|
||||
case input.SceneInput != nil:
|
||||
c, err = r.scraperCache().ScrapeFragment(ctx, *source.ScraperID, scraper.Input{Scene: input.SceneInput})
|
||||
content = []models.ScrapedContent{c}
|
||||
if c != nil {
|
||||
content = []models.ScrapedContent{c}
|
||||
}
|
||||
case input.Query != nil:
|
||||
content, err = r.scraperCache().ScrapeName(ctx, *source.ScraperID, *input.Query, models.ScrapeContentTypeScene)
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user