Skip to content

Commit

Permalink
[video] Ask the user for confirmation when turning a version into an …
Browse files Browse the repository at this point in the history
…extra or vice-versa
  • Loading branch information
CrystalP committed Jan 11, 2024
1 parent 10a1907 commit 92dd629
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
14 changes: 13 additions & 1 deletion addons/resource.language.en_gb/resources/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -23950,7 +23950,19 @@ msgctxt "#40034"
msgid "The default version of a movie with multiple versions cannot be added as an extra to another movie. Please move or remove the other versions first."
msgstr ""

#empty strings with id 40035 to 40199
#. Addition of new version: the user picked an extra of another movie. Ask for confirmation.
#: xbmc/video/dialogs/GUIDialogVideoManagerVersions.cpp
msgctxt "#40035"
msgid "You are about to convert a movie extra into a movie version. Are you sure?"
msgstr ""

#. Addition of new version: the user picked an extra of another movie. Ask for confirmation.
#: xbmc/video/dialogs/GUIDialogVideoManagerVersions.cpp
msgctxt "#40036"
msgid "You are about to convert a movie version into a movie extra. Are you sure?"
msgstr ""

#empty strings with id 40037 to 40199

#. Select default video version setting
#: system/settings/settings.xml
Expand Down
8 changes: 8 additions & 0 deletions xbmc/video/dialogs/GUIDialogVideoManagerExtras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ bool CGUIDialogVideoManagerExtras::AddVideoExtra()

// The video is an asset of another movie

// The video is a version, ask for confirmation
if (newAsset.m_assetType == VideoAssetType::VERSION &&
!CGUIDialogYesNo::ShowAndGetInput(CVariant{40015},
StringUtils::Format(g_localizeStrings.Get(40036))))
{
return false;
}

std::string videoTitle;
if (newAsset.m_mediaType == MediaTypeMovie)
{
Expand Down
8 changes: 8 additions & 0 deletions xbmc/video/dialogs/GUIDialogVideoManagerVersions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,14 @@ bool CGUIDialogVideoManagerVersions::AddVideoVersionFilePicker()

// The video is an asset of another movie

// The video is an extra, ask for confirmation
if (newAsset.m_assetType == VideoAssetType::EXTRA &&
!CGUIDialogYesNo::ShowAndGetInput(CVariant{40014},
StringUtils::Format(g_localizeStrings.Get(40035))))
{
return false;
}

std::string videoTitle;
if (newAsset.m_mediaType == MediaTypeMovie)
{
Expand Down

0 comments on commit 92dd629

Please sign in to comment.