Skip to content

Commit

Permalink
some corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz914 committed Jan 2, 2024
1 parent 664db69 commit 3613d2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Xbox TV",
"name": "homebridge-xbox-tv",
"version": "2.11.7",
"version": "2.11.8",
"description": "Homebridge plugin to control Xbox game consoles.",
"license": "MIT",
"author": "grzegorz914",
Expand Down
7 changes: 3 additions & 4 deletions src/xboxdevice.js
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,10 @@ class XboxDevice extends EventEmitter {
const inputsCount = inputs.length;
const possibleInputsCount = 85 - this.allServices.length;
const maxInputsCount = inputsCount >= possibleInputsCount ? possibleInputsCount : inputsCount;
let inputIdentifier = 0;
for (let i = 0; i < maxInputsCount; i++) {
//input
const input = inputs[i];
input.identifier = i + 1;

//get input reference
const inputReference = input.reference || input.titleId || input.oneStoreProductId;
Expand All @@ -778,13 +778,12 @@ class XboxDevice extends EventEmitter {
const name = input.name ?? 'App/Input';
const savedInputsNames = this.savedInputsNames[inputReference] ?? false;
const inputName = !savedInputsNames ? name : savedInputsNames;
input.name = inputName;

//get visibility
const currentVisibility = this.savedInputsTargetVisibility[inputReference] ?? 0;

input.identifier = inputIdentifier++;
input.name = inputName;
input.visibility = currentVisibility;

this.inputsConfigured.push(input);
}

Expand Down

0 comments on commit 3613d2d

Please sign in to comment.