[video] Allow changing the type of a movie asset between version and extra #25232
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.
Description
There was no reason to prevent the change of a movie version into an extra of the same movie (or vice versa).
That type of change is done through the "Add" button of the Versions/Extras Manger dialog and was already allowed and working when turning a movie version into an extra of a different movie for example.
The PR fine-tunes a couple conditions when adding a file as version or extra to a movie:
Same movie and same asset type (adding a version and asset was a version): rejected - should use the rename function instead
Same movie and different asset type (adding a version and the asset was an extra, or adding an extra and the asset was a version): allowed
The confirmation popup about moving an asset to a different movie only shows when actually moving an asset to a different movie. Was showing in other cases as well before PR.
Motivation and context
Reported by patk in Slack.
How has this been tested?
Changed movie version into extra of same movie, changed movie extra into version of same movie.
What is the effect on users?
Remove surprising behavior of versions/extras manager add buttons.
Screenshots (if appropriate):
Before:
After:
Types of change
Checklist: