Include old URL in script input (#3940)

* Include old URL in script input
* Include URL in update input
This commit is contained in:
WithoutPants
2023-07-26 12:59:16 +10:00
committed by GitHub
parent df70b182a4
commit 4b07c5b60b
3 changed files with 21 additions and 2 deletions

View File

@@ -157,6 +157,14 @@ type Input struct {
Gallery *ScrapedGalleryInput
}
// populateURL populates the URL field of the input based on the
// URLs field of the input. Does nothing if the URL field is already set.
func (i *Input) populateURL() {
if i.Scene != nil && i.Scene.URL == nil && len(i.Scene.URLs) > 0 {
i.Scene.URL = &i.Scene.URLs[0]
}
}
// simple type definitions that can help customize
// actions per query
type QueryType int