homebridge-xbox-tv 2.11.3 → 2.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/xboxdevice.js +3 -2
package/package.json
CHANGED
package/src/xboxdevice.js
CHANGED
|
@@ -273,8 +273,9 @@ class XboxDevice extends EventEmitter {
|
|
|
273
273
|
}
|
|
274
274
|
})
|
|
275
275
|
.on('stateChanged', (power, volume, mute, mediaState, titleId, reference) => {
|
|
276
|
-
const inputIdentifierR = this.inputsConfigured.findIndex(index => index.reference === reference) ??
|
|
277
|
-
const
|
|
276
|
+
const inputIdentifierR = this.inputsConfigured.findIndex(index => index.reference === reference) ?? -1;
|
|
277
|
+
const inputIdentifierT = this.inputsConfigured.findIndex(index => index.titleId === titleId) ?? -1;
|
|
278
|
+
const inputIdentifier = inputIdentifierR !== -1 ? inputIdentifierR : inputIdentifierT;
|
|
278
279
|
|
|
279
280
|
//update characteristics
|
|
280
281
|
if (this.televisionService) {
|