Skip to content
This repository
Browse code

Disc stubs: Changes to the displayed title in the dialog

  • Loading branch information...
commit 247bde189263db11bda15dd2b1db9a660095f322 1 parent 7f7f20c
ScudLee ScudLee authored

Showing 1 changed file with 9 additions and 14 deletions. Show diff stats Hide diff stats

  1. +9 14 xbmc/dialogs/GUIDialogPlayEject.cpp
23 xbmc/dialogs/GUIDialogPlayEject.cpp
@@ -101,20 +101,8 @@ bool CGUIDialogPlayEject::ShowAndGetInput(const CFileItem & item,
101 101 if (!pDialog)
102 102 return false;
103 103
104   - // Figure out Line 1 of the dialog
105   - CStdString strLine1;
106   - if (item.GetVideoInfoTag())
107   - {
108   - strLine1 = item.GetVideoInfoTag()->m_strTitle;
109   - }
110   - else
111   - {
112   - strLine1 = URIUtils::GetFileName(item.GetPath());
113   - URIUtils::RemoveExtension(strLine1);
114   - }
115   -
116   - // Figure out Line 2 of the dialog
117   - CStdString strLine2;
  104 + // Figure out Lines 1 and 2 of the dialog
  105 + CStdString strLine1, strLine2;
118 106 TiXmlDocument discStubXML;
119 107 if (discStubXML.LoadFile(item.GetPath()))
120 108 {
@@ -122,9 +110,16 @@ bool CGUIDialogPlayEject::ShowAndGetInput(const CFileItem & item,
122 110 if (!pRootElement || strcmpi(pRootElement->Value(), "discstub") != 0)
123 111 CLog::Log(LOGERROR, "Error loading %s, no <discstub> node", item.GetPath().c_str());
124 112 else
  113 + {
  114 + XMLUtils::GetString(pRootElement, "title", strLine1);
125 115 XMLUtils::GetString(pRootElement, "message", strLine2);
  116 + }
126 117 }
127 118
  119 + // Use the label for Line 1 if not defined
  120 + if (strLine1.IsEmpty())
  121 + strLine1 = item.GetLabel();
  122 +
128 123 // Setup dialog parameters
129 124 pDialog->SetHeading(219);
130 125 pDialog->SetLine(0, 429);

0 comments on commit 247bde1

Please sign in to comment.
Something went wrong with that request. Please try again.