Skip to content
Browse files

json-rpc: add Player.SetSubtitle support for live tv

Returns fails to execute in case of a radio channel instead of tv channel.
  • Loading branch information...
1 parent cfc6a9e commit 3a4b26043268fd2c6803ac0291fe7452ec54b8e3 @RobertMe RobertMe committed Aug 24, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 xbmc/interfaces/json-rpc/PlayerOperations.cpp
View
6 xbmc/interfaces/json-rpc/PlayerOperations.cpp
@@ -747,10 +747,12 @@ JSONRPC_STATUS CPlayerOperations::SetAudioStream(const CStdString &method, ITran
JSONRPC_STATUS CPlayerOperations::SetSubtitle(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result)
{
- switch (GetPlayer(parameterObject["playerid"]))
+ PlayerType player = GetPlayer(parameterObject["playerid"]);
+ switch (player)
{
case Video:
- if (g_application.m_pPlayer)
+ case LiveTV:
+ if (g_application.m_pPlayer && (player != LiveTV || g_PVRManager.IsPlayingTV()))
{
int index = -1;
if (parameterObject["subtitle"].isString())

0 comments on commit 3a4b260

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