diff options
author | Sascha Montellese <sascha.montellese@gmail.com> | 2013-02-11 08:51:45 -0800 |
---|---|---|
committer | Sascha Montellese <sascha.montellese@gmail.com> | 2013-02-11 08:51:45 -0800 |
commit | 728e9c1fee2bc91de0b130d2773e0ec18098570c (patch) | |
tree | ca1f5c8976cbd2f5110a9dfd66aa86e09cc3c66d | |
parent | 8332e8b0355ba35b034433b78b159a6829ee7acd (diff) | |
parent | 44916b33908f77692d8838446035de3e3bc10ca1 (diff) |
Merge pull request #2222 from ace20022/jsonrpc2
[json-rpc] fix Player.GetProperties' result "currentaudiostream" if there is no audio stream
-rw-r--r-- | xbmc/interfaces/json-rpc/PlayerOperations.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xbmc/interfaces/json-rpc/PlayerOperations.cpp b/xbmc/interfaces/json-rpc/PlayerOperations.cpp index c3d9a57c06..901e56252c 100644 --- a/xbmc/interfaces/json-rpc/PlayerOperations.cpp +++ b/xbmc/interfaces/json-rpc/PlayerOperations.cpp @@ -1361,10 +1361,11 @@ JSONRPC_STATUS CPlayerOperations::GetPropertyValue(PlayerType player, const CStd value.Empty(); g_application.m_pPlayer->GetAudioStreamLanguage(index, value); result["language"] = value; + + result["codec"] = g_application.m_pPlayer->GetAudioCodecName(); + result["bitrate"] = g_application.m_pPlayer->GetAudioBitrate(); + result["channels"] = g_application.m_pPlayer->GetChannels(); } - result["codec"] = g_application.m_pPlayer->GetAudioCodecName(); - result["bitrate"] = g_application.m_pPlayer->GetAudioBitrate(); - result["channels"] = g_application.m_pPlayer->GetChannels(); } else result = CVariant(CVariant::VariantTypeNull); |