From 1f6504803def3e5de8420426e99a3da58dec6b4f Mon Sep 17 00:00:00 2001 From: Grzegorz Date: Sun, 8 Sep 2024 10:52:19 +0200 Subject: [PATCH] fix publish --- package.json | 2 +- src/localApi/xboxlocalapi.js | 7 +++++-- src/xboxdevice.js | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 14bc9ef..7299bcf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "displayName": "Xbox TV", "name": "homebridge-xbox-tv", - "version": "3.1.9", + "version": "3.1.10", "description": "Homebridge plugin to control Xbox game consoles.", "license": "MIT", "author": "grzegorz914", diff --git a/src/localApi/xboxlocalapi.js b/src/localApi/xboxlocalapi.js index aecabe8..452f437 100644 --- a/src/localApi/xboxlocalapi.js +++ b/src/localApi/xboxlocalapi.js @@ -368,8 +368,11 @@ class XBOXLOCALAPI extends EventEmitter { //Prepare accessory await new Promise(resolve => setTimeout(resolve, 7500)); - const prepareAccessory = this.startPrepareAccessory && !this.isConnected ? this.emit('prepareAccessory') : false; - this.startPrepareAccessory = false; + //start external integration + const prepareExtInt = !this.isConnected ? this.emit('externalIntegration') : false; + + //prepare accessory + const prepareAccessory = !this.isConnected ? this.emit('prepareAccessory') : false; }).bind(); return true; diff --git a/src/xboxdevice.js b/src/xboxdevice.js index 5f5e811..9a93557 100644 --- a/src/xboxdevice.js +++ b/src/xboxdevice.js @@ -308,7 +308,7 @@ class XboxDevice extends EventEmitter { this.emit('message', `Media State: ${['PLAY', 'PAUSE', 'STOPPED', 'LOADING', 'INTERRUPTED'][mediaState]}`); }; }) - .on('externalIntegrations', (message) => { + .on('externalIntegrations', () => { try { //RESTFul server const restFulEnabled = this.restFul.enable || false;