homebridge-xbox-tv 3.8.2-beta.2 → 3.8.2-beta.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Xbox TV",
3
3
  "name": "homebridge-xbox-tv",
4
- "version": "3.8.2-beta.2",
4
+ "version": "3.8.2-beta.4",
5
5
  "description": "Homebridge plugin to control Xbox game consoles.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/xboxdevice.js CHANGED
@@ -238,8 +238,7 @@ class XboxDevice extends EventEmitter {
238
238
  if (this.enableDebugMode) this.emit('debug', `Read saved Info: ${JSON.stringify(this.savedInfo, null, 2)}`);
239
239
 
240
240
  //read inputs file
241
- if (this.enableDebugMode) this.emit('debug', `Read Inputs: ${this.inputs}`);
242
- const savedInputs = this.getInputsFromDevice ? await this.functions.readData(this.inputsFile) : this.inputs;
241
+ const savedInputs = await this.functions.readData(this.inputsFile);
243
242
  this.savedInputs = savedInputs.toString().trim() !== '' ? JSON.parse(savedInputs) : [];
244
243
  if (this.enableDebugMode) this.emit('debug', `Read saved Inputs: ${JSON.stringify(this.savedInputs, null, 2)}`);
245
244
 
@@ -937,6 +936,9 @@ class XboxDevice extends EventEmitter {
937
936
  //start
938
937
  async start() {
939
938
  try {
939
+ // Save inputs
940
+ await this.functions.saveData(this.inputsFile, this.inputs);
941
+
940
942
  // Web api client
941
943
  if (this.webApiControl) {
942
944
  try {