Scene Drafts can now get multiple links #824
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change allows Scene Drafts to be uploaded with multiple URLs.
UX changes
Unlike in the past, links that have no "Site" regex match will no longer be assigned the "Studio" site automatically. This was discussed on Discord. Instead, this replicates the current behaviour of the link parsing in Performer drafts.
Breaking Changes
This should not cause breaking changes, the "Urls" field is added to the GQL API. The old "Url" field should be deprecated, but this depends on Stash, so for now I intentionaly kept both fields available.
Further Improvements
I'll add another PR later to work on improving the way URLs are parsed in the Drafts frontend, to make sure URLs are mapped to Sites. But this will impact both Scenes and Performers, and is a different issue in my opinion.
This is my first time using Go, please let me know if I made some errors (although I didn't change much in the Go code tbh)
Resolves: #741