Multiple scene URLs (#3852)

* Add URLs scene relationship
* Update unit tests
* Update scene edit and details pages
* Update scrapers to use urls
* Post-process scenes during query scrape
* Update UI for URLs
* Change urls label
This commit is contained in:
WithoutPants
2023-07-12 11:51:52 +10:00
committed by GitHub
parent 76a4bfa49a
commit 67d4f9729a
50 changed files with 978 additions and 205 deletions

View File

@@ -92,7 +92,7 @@ func createFullScene(id int) models.Scene {
OCounter: ocounter,
Rating: &rating,
Organized: organized,
URL: url,
URLs: models.NewRelatedStrings([]string{url}),
Files: models.NewRelatedVideoFiles([]*file.VideoFile{
{
BaseFile: &file.BaseFile{
@@ -118,6 +118,7 @@ func createEmptyScene(id int) models.Scene {
},
},
}),
URLs: models.NewRelatedStrings([]string{}),
StashIDs: models.NewRelatedStashIDs([]models.StashID{}),
CreatedAt: createTime,
UpdatedAt: updateTime,
@@ -133,7 +134,7 @@ func createFullJSONScene(image string) *jsonschema.Scene {
OCounter: ocounter,
Rating: rating,
Organized: organized,
URL: url,
URLs: []string{url},
CreatedAt: json.JSONTime{
Time: createTime,
},
@@ -149,6 +150,7 @@ func createFullJSONScene(image string) *jsonschema.Scene {
func createEmptyJSONScene() *jsonschema.Scene {
return &jsonschema.Scene{
URLs: []string{},
Files: []string{path},
CreatedAt: json.JSONTime{
Time: createTime,