homebridge-xbox-tv 3.7.3-beta.4 → 3.7.3
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/xboxdevice.js +8 -9
package/package.json
CHANGED
package/src/xboxdevice.js
CHANGED
|
@@ -369,7 +369,14 @@ class XboxDevice extends EventEmitter {
|
|
|
369
369
|
for (const input of inputs) {
|
|
370
370
|
if (this.inputsServices.length >= 85 && !remove) continue;
|
|
371
371
|
|
|
372
|
+
// --- FILTER APPS ---
|
|
372
373
|
const inputReference = input.reference;
|
|
374
|
+
const contentType = input.contentType;
|
|
375
|
+
const filterGames = this.filterGames && contentType === 'Game';
|
|
376
|
+
const filterApps = this.filterApps && contentType === 'App';
|
|
377
|
+
const filterSystemApps = this.filterSystemApps && contentType === 'systemApp';
|
|
378
|
+
const filterDlc = this.filterDlc && contentType === 'Dlc';
|
|
379
|
+
if (filterGames || filterApps || filterSystemApps || filterDlc) continue;
|
|
373
380
|
|
|
374
381
|
// --- REMOVE ---
|
|
375
382
|
if (remove) {
|
|
@@ -385,14 +392,6 @@ class XboxDevice extends EventEmitter {
|
|
|
385
392
|
return false;
|
|
386
393
|
}
|
|
387
394
|
|
|
388
|
-
// --- FILTER APPS ---
|
|
389
|
-
const contentType = input.contentType;
|
|
390
|
-
const filterGames = this.filterGames && contentType === 'Game';
|
|
391
|
-
const filterApps = this.filterApps && contentType === 'App';
|
|
392
|
-
const filterSystemApps = this.filterSystemApps && contentType === 'systemApp';
|
|
393
|
-
const filterDlc = this.filterDlc && contentType === 'Dlc';
|
|
394
|
-
if (filterGames || filterApps || filterSystemApps || filterDlc) continue;
|
|
395
|
-
|
|
396
395
|
// --- ADD OR UPDATE ---
|
|
397
396
|
let inputService = this.inputsServices.find(s => s.reference === inputReference);
|
|
398
397
|
|
|
@@ -403,7 +402,7 @@ class XboxDevice extends EventEmitter {
|
|
|
403
402
|
const inputVisibility = this.savedInputsTargetVisibility[inputReference] ?? 0;
|
|
404
403
|
|
|
405
404
|
if (inputService) {
|
|
406
|
-
if (inputService.name === inputName)
|
|
405
|
+
if (inputService.name === inputName) return;
|
|
407
406
|
|
|
408
407
|
// === UPDATE EXISTING ===
|
|
409
408
|
inputService.name = sanitizedName;
|