mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Add JSON scrape support (#717)
* Add support for scene fragment scrape in xpath
This commit is contained in:
@@ -191,3 +191,14 @@ func (s *stashScraper) scrapePerformerByURL(url string) (*models.ScrapedPerforme
|
||||
func (s *stashScraper) scrapeSceneByURL(url string) (*models.ScrapedScene, error) {
|
||||
return nil, errors.New("scrapeSceneByURL not supported for stash scraper")
|
||||
}
|
||||
|
||||
func sceneFromUpdateFragment(scene models.SceneUpdateInput) (*models.Scene, error) {
|
||||
qb := models.NewSceneQueryBuilder()
|
||||
id, err := strconv.Atoi(scene.ID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// TODO - should we modify it with the input?
|
||||
return qb.Find(id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user