homebridge-denon-tv 5.3.1 → 5.3.2
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 +1 -1
- package/src/denon.js +24 -3
package/package.json
CHANGED
package/src/denon.js
CHANGED
|
@@ -213,13 +213,34 @@ class Denon extends EventEmitter {
|
|
|
213
213
|
const deviceInputsOldAvr = this.generation === 0 && inputFuncListExistOldAvr ? devInfo.InputFuncList.value : [];
|
|
214
214
|
const deviceInputsNewAvr = supportInputSource ? zoneCapabilities.InputSource.List.Source : [];
|
|
215
215
|
const deviceInputs = this.getInputsFromDevice ? [deviceInputsOldAvr, deviceInputsNewAvr, deviceInputsNewAvr][this.generation] : this.inputs;
|
|
216
|
-
|
|
216
|
+
let allInputs = await this.getInputs(devInfo, this.generation, this.zone, deviceInputs, zoneCapabilities, this.getInputsFromDevice, this.getFavoritesFromDevice, this.getQuickSmartSelectFromDevice, supportFavorites, supportShortcut, supportQuickSmartSelect);
|
|
217
217
|
const inputsExist = allInputs.length > 0;
|
|
218
218
|
|
|
219
219
|
//check inputs
|
|
220
220
|
if (!inputsExist) {
|
|
221
|
-
this.emit('warn', `Found: 0 inputs`);
|
|
222
|
-
|
|
221
|
+
this.emit('warn', `Found: 0 inputs, adding 1 default input`);
|
|
222
|
+
let inputMode = 'SI';
|
|
223
|
+
switch (this.zone) {
|
|
224
|
+
case 0:
|
|
225
|
+
inputMode = 'SI';
|
|
226
|
+
break;
|
|
227
|
+
case 1:
|
|
228
|
+
inputMode = 'Z2';
|
|
229
|
+
break;
|
|
230
|
+
case 2:
|
|
231
|
+
inputMode = 'Z3';
|
|
232
|
+
break;
|
|
233
|
+
case 3:
|
|
234
|
+
inputMode = 'MS';
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
allInputs = [
|
|
238
|
+
{
|
|
239
|
+
name: "CBL/SAT",
|
|
240
|
+
reference: "SAT/CBL",
|
|
241
|
+
mode: inputMode
|
|
242
|
+
}
|
|
243
|
+
]
|
|
223
244
|
}
|
|
224
245
|
|
|
225
246
|
//save inputs if exist
|