Permalink
Browse files

json-rpc: handle pvr live tv items in announcements

Set item type and id
Update player.playerid to show as music and video
  • Loading branch information...
1 parent 7bb55c3 commit cfc6a9e8b071ee17d72ab458ac96cadacffea0f6 @RobertMe RobertMe committed Aug 23, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 xbmc/interfaces/AnnouncementManager.cpp
@@ -29,6 +29,8 @@
#include "music/tags/MusicInfoTag.h"
#include "music/MusicDatabase.h"
#include "video/VideoDatabase.h"
+#include "pvr/channels/PVRChannel.h"
+#include "PlayListPlayer.h"
#define LOOKUP_PROPERTY "database-lookup"
@@ -184,6 +186,14 @@ void CAnnouncementManager::Announce(AnnouncementFlag flag, const char *sender, c
object["artist"] = item->GetMusicInfoTag()->GetArtist();
}
}
+ else if(item->HasPVRChannelInfoTag())
+ {
+ PVR::CPVRChannel *channel = item->GetPVRChannelInfoTag();
+ id = channel->ChannelID();
+ type = channel->IsRadio() ? "radio" : "tv";
+ if(data.isMember("player") && data["player"].isMember("playerid"))
+ object["player"]["playerid"] = channel->IsRadio() ? PLAYLIST_MUSIC : PLAYLIST_VIDEO;
+ }
else
type = "unknown";

0 comments on commit cfc6a9e

Please sign in to comment.