homebridge-denon-tv 4.4.3 → 4.4.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": "Denon TV",
3
3
  "name": "homebridge-denon-tv",
4
- "version": "4.4.3",
4
+ "version": "4.4.4",
5
5
  "description": "Homebridge plugin to control Denon/Marantz AV Receivers.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/denon.js CHANGED
@@ -255,7 +255,7 @@ class DENON extends EventEmitter {
255
255
 
256
256
  this.checkState();
257
257
  } catch (error) {
258
- const debug = disableLogConnectError ? false : this.emit('error', `State error: ${error}, reconnect in 15s.`);
258
+ const debug = disableLogConnectError ? false : this.emit('error', `State error: ${error}, reconnect in ${this.refreshInterval}s.`);
259
259
  this.emit('disconnect');
260
260
  };
261
261
  })
@@ -793,25 +793,24 @@ class DenonDevice extends EventEmitter {
793
793
  const inputsCount = inputs.length;
794
794
  const possibleInputsCount = 85 - this.allServices.length;
795
795
  const maxInputsCount = inputsCount >= possibleInputsCount ? possibleInputsCount : inputsCount;
796
- let inputIdentifier = 0;
797
796
  for (let i = 0; i < maxInputsCount; i++) {
798
797
  //input
799
798
  const input = inputs[i];
800
-
801
- //get input reference
802
- const inputReference = input.reference;
799
+ input.identifier = i + 1;
803
800
 
804
801
  //get input name
805
802
  const name = input.name ?? 'App/Input';
806
- const savedInputsNames = this.savedInputsNames[inputReference] ?? false;
803
+ const savedInputsNames = this.savedInputsNames[input.reference] ?? false;
807
804
  const inputName = !savedInputsNames ? name : savedInputsNames;
805
+ input.name = inputName;
806
+
807
+ //get input reference
808
+ const inputReference = input.reference;
808
809
 
809
810
  //get visibility
810
811
  const currentVisibility = this.savedInputsTargetVisibility[inputReference] ?? 0;
811
-
812
- input.identifier = inputIdentifier++;
813
- input.name = inputName;
814
812
  input.visibility = currentVisibility;
813
+
815
814
  this.inputsConfigured.push(input);
816
815
  }
817
816