homebridge-xbox-tv 3.7.4 → 3.7.5

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.7.4",
4
+ "version": "3.7.5",
5
5
  "description": "Homebridge plugin to control Xbox game consoles.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/xboxdevice.js CHANGED
@@ -402,16 +402,16 @@ class XboxDevice extends EventEmitter {
402
402
 
403
403
  if (inputService) {
404
404
  // === UPDATE EXISTING ===
405
- inputService.name = sanitizedName;
406
- inputService.visibility = inputVisibility;
405
+ const nameChanged = inputService.name !== sanitizedName;
407
406
 
408
- inputService
409
- .updateCharacteristic(Characteristic.Name, sanitizedName)
410
- .updateCharacteristic(Characteristic.ConfiguredName, sanitizedName)
411
- .updateCharacteristic(Characteristic.TargetVisibilityState, inputVisibility)
412
- .updateCharacteristic(Characteristic.CurrentVisibilityState, inputVisibility);
407
+ if (nameChanged) {
408
+ inputService.name = sanitizedName;
409
+ inputService
410
+ .updateCharacteristic(Characteristic.Name, sanitizedName)
411
+ .updateCharacteristic(Characteristic.ConfiguredName, sanitizedName)
413
412
 
414
- if (this.enableDebugMode) this.emit('debug', `Updated input: ${input.name} (${inputReference})`);
413
+ if (this.enableDebugMode) this.emit('debug', `Updated input: ${input.name} (${inputReference})`);
414
+ }
415
415
  } else {
416
416
  // === CREATE NEW ===
417
417
  const identifier = this.inputsServices.length + 1;