homebridge-xbox-tv 3.6.8 → 3.6.9

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.6.8",
4
+ "version": "3.6.9",
5
5
  "description": "Homebridge plugin to control Xbox game consoles.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/xboxdevice.js CHANGED
@@ -298,9 +298,6 @@ class XboxDevice extends EventEmitter {
298
298
  async displayOrder() {
299
299
  try {
300
300
  switch (this.inputsDisplayOrder) {
301
- case 0:
302
- this.inputsConfigured.sort((a, b) => a.identifier - b.identifier);
303
- break;
304
301
  case 1:
305
302
  this.inputsConfigured.sort((a, b) => a.name.localeCompare(b.name));
306
303
  break;
@@ -313,12 +310,14 @@ class XboxDevice extends EventEmitter {
313
310
  case 4:
314
311
  this.inputsConfigured.sort((a, b) => b.reference.localeCompare(a.reference));
315
312
  break;
313
+ default:
314
+ return;
316
315
  }
317
- const debug = !this.enableDebugMode ? false : this.emit('debug', `Inputs display order: ${JSON.stringify(this.inputsConfigured, null, 2)}`);
316
+ const debug = this.enableDebugMode ? this.emit('debug', `Inputs display order: ${JSON.stringify(this.inputsConfigured, null, 2)}`) : false;
318
317
 
319
318
  const displayOrder = this.inputsConfigured.map(input => input.identifier);
320
319
  this.televisionService.setCharacteristic(Characteristic.DisplayOrder, Encode(1, displayOrder).toString('base64'));
321
- return true;
320
+ return;
322
321
  } catch (error) {
323
322
  throw new Error(`Display order error: ${error}`);
324
323
  }