homebridge-xbox-tv 2.11.6 → 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/README.md +1 -1
- package/package.json +1 -1
- package/src/xboxdevice.js +5 -6
package/README.md
CHANGED
|
@@ -80,7 +80,7 @@ Homebridge plugin for Microsoft game Consoles. Tested with Xbox One X/S and Xbox
|
|
|
80
80
|
| `filterApps` | If enabled, Apps will be hidden and not displayed in the inputs list, only available if `webApiControl` enabled. |
|
|
81
81
|
| `filterSystemApps` | If enabled, System Apps (Accessory, Microsoft Store, Television) will be hidden and not displayed in the inputs list, only available if `webApiControl` enabled. |
|
|
82
82
|
| `filterDlc` | If enabled, Dlc will be hidden and not displayed in the inputs list, only available if `webApiControl` enabled. |
|
|
83
|
-
| `inputsDisplayOrder` | Here select display order of the inputs list, `None`, `
|
|
83
|
+
| `inputsDisplayOrder` | Here select display order of the inputs list, `None`, `Ascending by Name`, `Descending by Name`, `Ascending by Reference`, `Ascending by Reference`. |
|
|
84
84
|
| `inputs.name` | Here set *Input Name* which You want expose to the *Homebridge/HomeKit*, `Screensaver`, `Television`, `TV Settings`, `Dashboard`, `Accessory`, `Settings`, `Network Troubleshooter`, `Microsoft Store`, `Xbox Guide` are created by default. |
|
|
85
85
|
| `inputs.reference` | Required to identify current running app. |
|
|
86
86
|
| `inputs.oneStoreProductId` | Required to switch apps. |
|
package/package.json
CHANGED
package/src/xboxdevice.js
CHANGED
|
@@ -77,7 +77,7 @@ class XboxDevice extends EventEmitter {
|
|
|
77
77
|
this.volume = 0;
|
|
78
78
|
this.mute = true;
|
|
79
79
|
this.mediaState = 0;
|
|
80
|
-
this.inputIdentifier =
|
|
80
|
+
this.inputIdentifier = 1;
|
|
81
81
|
this.reference = '';
|
|
82
82
|
|
|
83
83
|
this.sensorScreenSaverState = false;
|
|
@@ -274,7 +274,7 @@ class XboxDevice extends EventEmitter {
|
|
|
274
274
|
})
|
|
275
275
|
.on('stateChanged', (power, volume, mute, mediaState, titleId, reference) => {
|
|
276
276
|
const indexR = this.inputsConfigured.findIndex(input => input.reference === reference) ?? -1;
|
|
277
|
-
const indexT = this.inputsConfigured.findIndex(input => input.
|
|
277
|
+
const indexT = this.inputsConfigured.findIndex(input => input.titleId === titleId) ?? this.inputIdentifier;
|
|
278
278
|
const inputIdentifier = indexR !== -1 ? indexR : indexT;
|
|
279
279
|
|
|
280
280
|
//update characteristics
|
|
@@ -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
|
|