Skip to content
This repository
Browse code

Merge pull request #2417 from ulion/fix_empty_video_title_in_announce

Fix empty video title in announce
  • Loading branch information...
commit d32f88a7ad82585c85c8229a77b52c55c7d62583 2 parents 482797f + c002463
Sascha Montellese authored March 15, 2013

Showing 1 changed file with 10 additions and 1 deletion. Show diff stats Hide diff stats

  1. 11  xbmc/interfaces/AnnouncementManager.cpp
11  xbmc/interfaces/AnnouncementManager.cpp
@@ -137,7 +137,10 @@ void CAnnouncementManager::Announce(AnnouncementFlag flag, const char *sender, c
137 137
       // TODO: Can be removed once this is properly handled when starting playback of a file
138 138
       item->SetProperty(LOOKUP_PROPERTY, false);
139 139
 
140  
-      object["item"]["title"] = item->GetVideoInfoTag()->m_strTitle;
  140
+      CStdString title = item->GetVideoInfoTag()->m_strTitle;
  141
+      if (title.IsEmpty())
  142
+        title = item->GetLabel();
  143
+      object["item"]["title"] = title;
141 144
 
142 145
       switch (item->GetVideoContentType())
143 146
       {
@@ -203,6 +206,12 @@ void CAnnouncementManager::Announce(AnnouncementFlag flag, const char *sender, c
203 206
         object["item"]["artist"] = item->GetMusicInfoTag()->GetArtist();
204 207
     }
205 208
   }
  209
+  else if (item->IsVideo())
  210
+  {
  211
+    // video item but has no video info tag.
  212
+    type = "movies";
  213
+    object["item"]["title"] = item->GetLabel();
  214
+  }
206 215
   else if (item->HasPictureInfoTag())
207 216
   {
208 217
     type = "picture";

0 notes on commit d32f88a

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