Add stash scraper type (#269)

* Add stash scraper type

* Add graphql client to vendor

* Embed stash credentials in URL

* Fill URL from scraped scene

* Nil IDs returned from remote stash

* Nil check
This commit is contained in:
WithoutPants
2019-12-21 11:13:23 +11:00
committed by Leopere
parent e58088b057
commit f52db4f58b
21 changed files with 1526 additions and 52 deletions

View File

@@ -10,10 +10,10 @@ import (
func (r *queryResolver) FindScene(ctx context.Context, id *string, checksum *string) (*models.Scene, error) {
qb := models.NewSceneQueryBuilder()
idInt, _ := strconv.Atoi(*id)
var scene *models.Scene
var err error
if id != nil {
idInt, _ := strconv.Atoi(*id)
scene, err = qb.Find(idInt)
} else if checksum != nil {
scene, err = qb.FindByChecksum(*checksum)