Add new fields to scene tagger (#3094)

* Add new fields to scene tagger
* Update scraper docs with new fields
* Set code and director in identify
* Add new fields to identify dialog
This commit is contained in:
WithoutPants
2022-11-10 12:51:49 +11:00
committed by GitHub
parent a2ca266cb3
commit eb795ff9ab
5 changed files with 66 additions and 3 deletions

View File

@@ -280,6 +280,16 @@ func getScenePartial(scene *models.Scene, scraped *scraper.ScrapedScene, fieldOp
partial.URL = models.NewOptionalString(*scraped.URL)
}
}
if scraped.Director != nil && (scene.Director != *scraped.Director) {
if shouldSetSingleValueField(fieldOptions["director"], scene.Director != "") {
partial.Director = models.NewOptionalString(*scraped.Director)
}
}
if scraped.Code != nil && (scene.Code != *scraped.Code) {
if shouldSetSingleValueField(fieldOptions["code"], scene.Code != "") {
partial.Code = models.NewOptionalString(*scraped.Code)
}
}
if setOrganized && !scene.Organized {
// just reuse the boolean since we know it's true