Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2163 from Montellese/artwork_add

add "Add art" button to video artwork selection dialog
  • Loading branch information...
commit e008bada2d11eec8631e08dd9a623f69bb4dc1e3 2 parents 07361ee + 2726cb1
Sascha Montellese Montellese authored
7 language/English/strings.po
View
@@ -5383,7 +5383,12 @@ msgctxt "#13515"
msgid "No art"
msgstr ""
-#empty strings from id 13516 to 13549
+#: xbmc/video/dialogs/GUIDialogVideoInfo.cpp
+msgctxt "#13516"
+msgid "Add art"
+msgstr ""
+
+#empty strings from id 13517 to 13549
#: xbmc/settings/GUISettings.cpp
msgctxt "#13550"
12 xbmc/video/dialogs/GUIDialogVideoInfo.cpp
View
@@ -29,6 +29,7 @@
#include "video/VideoInfoScanner.h"
#include "ApplicationMessenger.h"
#include "video/VideoInfoTag.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "guilib/GUIWindowManager.h"
#include "dialogs/GUIDialogOK.h"
#include "dialogs/GUIDialogYesNo.h"
@@ -604,6 +605,7 @@ string CGUIDialogVideoInfo::ChooseArtType(const CFileItem &videoItem, map<string
dialog->SetHeading(13511);
dialog->Reset();
dialog->SetUseDetails(true);
+ dialog->EnableButton(true, 13516);
CVideoDatabase db;
db.Open();
@@ -631,6 +633,16 @@ string CGUIDialogVideoInfo::ChooseArtType(const CFileItem &videoItem, map<string
dialog->SetItems(&items);
dialog->DoModal();
+ if (dialog->IsButtonPressed())
+ {
+ // Get the new artwork name
+ CStdString strArtworkName;
+ if (!CGUIKeyboardFactory::ShowAndGetInput(strArtworkName, g_localizeStrings.Get(13516), false))
+ return "";
+
+ return strArtworkName;
+ }
+
return dialog->GetSelectedItem()->GetLabel();
}
Please sign in to comment.
Something went wrong with that request. Please try again.