From 2481de7360d3a7e1de25d1e4226344e1ee327393 Mon Sep 17 00:00:00 2001 From: topfs2 Date: Thu, 6 May 2010 23:15:37 +0000 Subject: Fixed webinterface to work with the altered GetActivePlayers result git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@29862 568bbfeb-2a22-0410-94d2-cc84cf5bfa90 --- web/poc_jsonrpc/nowplaying.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'web') diff --git a/web/poc_jsonrpc/nowplaying.html b/web/poc_jsonrpc/nowplaying.html index 2eb9eb50a6..9c3931306c 100644 --- a/web/poc_jsonrpc/nowplaying.html +++ b/web/poc_jsonrpc/nowplaying.html @@ -44,8 +44,10 @@ http_request.open( "POST", "jsonrpc", false ); http_request.send('{"jsonrpc": "2.0", "method": "Player.GetActivePlayers", "id": 1}'); var players = JSON.parse(http_request.responseText)["result"]; -if (players.length > 0) { - var player = players[0]; +if (players["video"] || players["audio"]) { + var player = "Video"; + if (players["audio"]) + player = "Audio"; http_request = new XMLHttpRequest(); http_request.open( "POST", "jsonrpc", false ); -- cgit v1.2.3