added turn off on the amplifier when kodi unpauses
This commit is contained in:
parent
9d287417ae
commit
0a5932d7cd
1 changed files with 8 additions and 2 deletions
|
@ -148,13 +148,19 @@ void CKodiClient::Parse(const std::string& jsonstr)
|
|||
{
|
||||
json jsondata = json::parse(jsonstr);
|
||||
|
||||
//If Kodi signals a Player.OnPlay notification, the amplifier should be turned on.
|
||||
if (jsondata.contains("method"))
|
||||
{
|
||||
if (jsondata["method"] == "Player.OnPlay")
|
||||
std::string method = jsondata["method"];
|
||||
|
||||
if (method == "Player.OnPlay")
|
||||
{
|
||||
printf("Player started\n");
|
||||
m_ampswitch->SignalPlayStart();
|
||||
}
|
||||
else if (method == "Player.OnResume")
|
||||
{
|
||||
printf("Player unpaused\n");
|
||||
m_ampswitch->SignalPlayStart();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue