homebridge-xbox-tv 2.12.2 → 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 +5 -5
package/package.json
CHANGED
package/src/xboxdevice.js
CHANGED
|
@@ -491,9 +491,10 @@ 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
|
})
|
|
@@ -510,8 +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
|
|
514
|
-
const tryAgain = this.power && inputIdentifier !== -1 ? this.televisionService.setCharacteristic(Characteristic.ActiveIdentifier, inputIdentifier) : false;
|
|
514
|
+
const tryAgain = this.power ? this.televisionService.setCharacteristic(Characteristic.ActiveIdentifier, activeIdentifier) : false;
|
|
515
515
|
break;
|
|
516
516
|
case true:
|
|
517
517
|
switch (inputOneStoreProductId) {
|