Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@Montellese Montellese authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 xbmc/interfaces/AnnouncementManager.cpp
View
11 xbmc/interfaces/AnnouncementManager.cpp
@@ -137,7 +137,10 @@ void CAnnouncementManager::Announce(AnnouncementFlag flag, const char *sender, c
// TODO: Can be removed once this is properly handled when starting playback of a file
item->SetProperty(LOOKUP_PROPERTY, false);
- object["item"]["title"] = item->GetVideoInfoTag()->m_strTitle;
+ CStdString title = item->GetVideoInfoTag()->m_strTitle;
+ if (title.IsEmpty())
+ title = item->GetLabel();
+ object["item"]["title"] = title;
switch (item->GetVideoContentType())
{
@@ -203,6 +206,12 @@ void CAnnouncementManager::Announce(AnnouncementFlag flag, const char *sender, c
object["item"]["artist"] = item->GetMusicInfoTag()->GetArtist();
}
}
+ else if (item->IsVideo())
+ {
+ // video item but has no video info tag.
+ type = "movies";
+ object["item"]["title"] = item->GetLabel();
+ }
else if (item->HasPictureInfoTag())
{
type = "picture";

0 comments on commit d32f88a

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