homebridge-xbox-tv 2.12.1 → 2.12.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 +7 -6
package/package.json
CHANGED
package/src/xboxdevice.js
CHANGED
|
@@ -491,15 +491,16 @@ class XboxDevice extends EventEmitter {
|
|
|
491
491
|
this.televisionService.getCharacteristic(Characteristic.ActiveIdentifier)
|
|
492
492
|
.onGet(async () => {
|
|
493
493
|
const inputIdentifier = this.inputIdentifier;
|
|
494
|
-
const
|
|
495
|
-
const
|
|
496
|
-
const
|
|
494
|
+
const index = this.inputsConfigured.findIndex(input => input.identifier === inputIdentifier);
|
|
495
|
+
const inputOneStoreProductId = this.inputsConfigured[index].oneStoreProductId;
|
|
496
|
+
const inputReference = this.inputsConfigured[index].reference;
|
|
497
|
+
const inputName = this.inputsConfigured[index].name;
|
|
497
498
|
const logInfo = this.disableLogInfo ? false : this.emit('message', `Input: ${inputName}, Reference: ${inputReference}, Product Id: ${inputOneStoreProductId}`);
|
|
498
499
|
return inputIdentifier;
|
|
499
500
|
})
|
|
500
|
-
.onSet(async (
|
|
501
|
+
.onSet(async (activeIdentifier) => {
|
|
501
502
|
try {
|
|
502
|
-
const index = this.inputsConfigured.findIndex(input => input.identifier ===
|
|
503
|
+
const index = this.inputsConfigured.findIndex(input => input.identifier === activeIdentifier);
|
|
503
504
|
const inputOneStoreProductId = this.inputsConfigured[index].oneStoreProductId;
|
|
504
505
|
const inputReference = this.inputsConfigured[index].reference;
|
|
505
506
|
const inputName = this.inputsConfigured[index].name;
|
|
@@ -510,7 +511,7 @@ class XboxDevice extends EventEmitter {
|
|
|
510
511
|
switch (this.power) {
|
|
511
512
|
case false:
|
|
512
513
|
await new Promise(resolve => setTimeout(resolve, 4000));
|
|
513
|
-
const tryAgain = this.power ? this.televisionService.setCharacteristic(Characteristic.ActiveIdentifier,
|
|
514
|
+
const tryAgain = this.power ? this.televisionService.setCharacteristic(Characteristic.ActiveIdentifier, activeIdentifier) : false;
|
|
514
515
|
break;
|
|
515
516
|
case true:
|
|
516
517
|
switch (inputOneStoreProductId) {
|