mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +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:
@@ -258,7 +258,10 @@ func (q *jsonQuery) runQuery(selector string) ([]string, error) {
|
||||
value := gjson.Get(q.doc, selector)
|
||||
|
||||
if !value.Exists() {
|
||||
return nil, fmt.Errorf("could not find json path '%s' in json object", selector)
|
||||
// many possible reasons why the selector may not be in the json object
|
||||
// and not all are errors.
|
||||
// Just return nil
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
var ret []string
|
||||
|
||||
Reference in New Issue
Block a user