Skip to content

Commit

Permalink
#3: stop Kodi playback when switching source back to TV
Browse files Browse the repository at this point in the history
or TV standby
  • Loading branch information
ballle98 committed Jan 10, 2024
1 parent ee988b7 commit 6765544
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cec-lirc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,15 @@ void CECSourceActivated(void* cbParam, const cec_logical_address
logicalAddress, const uint8_t bActivated) {

(logMask & CEC_LOG_DEBUG)
&& cout << "CECSourceActivated: " << unsigned(logicalAddress) <<
unsigned(bActivated) << endl;
&& cout << "CECSourceActivated: LA=" << unsigned(logicalAddress) <<
" activated=" << unsigned(bActivated) << endl;

if ((logicalAddress ==
(cec_logical_address)CEC_DEVICE_TYPE_AUDIO_SYSTEM) && (!bActivated)){
(logMask & CEC_LOG_DEBUG)
&& cout << "Stop Kodi playback" << endl;
xbmc.SendButton("stop", "R1", BTN_NO_REPEAT);
}

}

Expand Down

0 comments on commit 6765544

Please sign in to comment.