homebridge-xbox-tv 2.11.7 → 2.11.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Xbox TV",
3
3
  "name": "homebridge-xbox-tv",
4
- "version": "2.11.7",
4
+ "version": "2.11.8",
5
5
  "description": "Homebridge plugin to control Xbox game consoles.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/xboxdevice.js CHANGED
@@ -766,10 +766,10 @@ class XboxDevice extends EventEmitter {
766
766
  const inputsCount = inputs.length;
767
767
  const possibleInputsCount = 85 - this.allServices.length;
768
768
  const maxInputsCount = inputsCount >= possibleInputsCount ? possibleInputsCount : inputsCount;
769
- let inputIdentifier = 0;
770
769
  for (let i = 0; i < maxInputsCount; i++) {
771
770
  //input
772
771
  const input = inputs[i];
772
+ input.identifier = i + 1;
773
773
 
774
774
  //get input reference
775
775
  const inputReference = input.reference || input.titleId || input.oneStoreProductId;
@@ -778,13 +778,12 @@ class XboxDevice extends EventEmitter {
778
778
  const name = input.name ?? 'App/Input';
779
779
  const savedInputsNames = this.savedInputsNames[inputReference] ?? false;
780
780
  const inputName = !savedInputsNames ? name : savedInputsNames;
781
+ input.name = inputName;
781
782
 
782
783
  //get visibility
783
784
  const currentVisibility = this.savedInputsTargetVisibility[inputReference] ?? 0;
784
-
785
- input.identifier = inputIdentifier++;
786
- input.name = inputName;
787
785
  input.visibility = currentVisibility;
786
+
788
787
  this.inputsConfigured.push(input);
789
788
  }
790
789