aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrystalP <crystalp@kodi.tv>2024-01-09 04:49:52 -0500
committerCrystalP <crystalp@kodi.tv>2024-01-11 13:43:37 -0500
commit92dd629dc337e98b482491161ec01a6b8b38be4a (patch)
tree74b6cc5754fb8b8f32e2f5dbe3b651474287b83e
parent10a1907cb86260b3c1c9762cd86399528265aa46 (diff)
[video] Ask the user for confirmation when turning a version into an extra or vice-versa
-rw-r--r--addons/resource.language.en_gb/resources/strings.po14
-rw-r--r--xbmc/video/dialogs/GUIDialogVideoManagerExtras.cpp8
-rw-r--r--xbmc/video/dialogs/GUIDialogVideoManagerVersions.cpp8
3 files changed, 29 insertions, 1 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index f603773118..57c44ea976 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -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
diff --git a/xbmc/video/dialogs/GUIDialogVideoManagerExtras.cpp b/xbmc/video/dialogs/GUIDialogVideoManagerExtras.cpp
index 6ee1374615..027f9d3f1b 100644
--- a/xbmc/video/dialogs/GUIDialogVideoManagerExtras.cpp
+++ b/xbmc/video/dialogs/GUIDialogVideoManagerExtras.cpp
@@ -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)
{
diff --git a/xbmc/video/dialogs/GUIDialogVideoManagerVersions.cpp b/xbmc/video/dialogs/GUIDialogVideoManagerVersions.cpp
index 7fbe389aa9..1b8290be94 100644
--- a/xbmc/video/dialogs/GUIDialogVideoManagerVersions.cpp
+++ b/xbmc/video/dialogs/GUIDialogVideoManagerVersions.cpp
@@ -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)
{