Skip to content

Commit

Permalink
bump 1.7.0
Browse files Browse the repository at this point in the history
## [1.7.0] - 2021-08-31
## Changes
- code refactorin
- added default inputs TV, Settings, Dashboard, Accessory, no need to create it in config
- many small changes and stability improvements
  • Loading branch information
grzegorz914 committed Aug 31, 2021
1 parent 61409a3 commit 24cf64d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.7.1] - 2021-08-31
## Changes
- code refactorin
- added default inputs TV, Settings, Dashboard, Accessory, no need to create it in config
- many small changes and stability improvements

## [1.6.3] - 2021-08-05
## Changes
- added alternative check current running app if reference app is missing
Expand Down
4 changes: 2 additions & 2 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"pluginType": "platform",
"singular": true,
"customUi": true,
"headerDisplay": "This plugin works with Xbox game consoles and are exposed to HomeKit as separate accessories and each needs to be manually paired.\n\n1. Open the Home <img src='https://user-images.githubusercontent.com/3979615/78010622-4ea1d380-738e-11ea-8a17-e6a465eeec35.png' height='16.42px'> app on your device.\n2. Tap the Home tab, then tap <img src='https://user-images.githubusercontent.com/3979615/78010869-9aed1380-738e-11ea-9644-9f46b3633026.png' height='16.42px'>.\n3. Tap *Add Accessory*, and select *I Don't Have a Code or Cannot Scan*.\n4. Enter the Homebridge PIN, this can be found under the QR code in Homebridge UI or your Homebridge logs, alternatively you can select *Use Camera* and scan the QR code again.",
"footerDisplay": "This plugin works with Xbox game console which is available [here](https://github.com/grzegorz914/homebridge-xbox-tv).",
"headerDisplay": "This plugin works with Xbox game consoles and are exposed to HomeKit as separate accessories and each needs to be manually paired.\n\n1. Open the Home <img src='https://user-images.githubusercontent.com/3979615/78010622-4ea1d380-738e-11ea-8a17-e6a465eeec35.png' height='16.42px'> app on your device.\n2. Tap the Home tab, then tap <img src='https://user-images.githubusercontent.com/3979615/78010869-9aed1380-738e-11ea-9644-9f46b3633026.png' height='16.42px'>.\n3. Tap *Add Accessory*, and select *I Don't Have a Code or select More Options*.\n4. Select Accessory and Enter the Homebridge PIN, or scan the QR code in Homebridge UI.",
"footerDisplay": "This plugin is available [here](https://github.com/grzegorz914/homebridge-meraki-control).",
"schema": {
"type": "object",
"properties": {
Expand Down
12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ class xboxTvDevice {
this.inputType = 0;

this.prefDir = path.join(api.user.storagePath(), 'xboxTv');
this.devInfoFile = this.prefDir + '/' + 'devInfo_' + this.host.split('.').join('');
this.authTokenFile = this.prefDir + '/' + 'authToken_' + this.host.split('.').join('');
this.devInfoFile = this.prefDir + '/' + 'devInfo_' + this.host.split('.').join('');
this.inputsFile = this.prefDir + '/' + 'inputs_' + this.host.split('.').join('');
this.inputsNamesFile = this.prefDir + '/' + 'inputsNames_' + this.host.split('.').join('');
this.targetVisibilityInputsFile = this.prefDir + '/' + 'targetVisibilityInputs_' + this.host.split('.').join('');
Expand All @@ -224,12 +224,12 @@ class xboxTvDevice {
if (fs.existsSync(this.prefDir) == false) {
fsPromises.mkdir(this.prefDir);
}
if (fs.existsSync(this.devInfoFile) == false) {
fsPromises.writeFile(this.devInfoFile, '');
}
if (fs.existsSync(this.authTokenFile) == false) {
fsPromises.writeFile(this.authTokenFile, '');
}
if (fs.existsSync(this.devInfoFile) == false) {
fsPromises.writeFile(this.devInfoFile, '');
}
if (fs.existsSync(this.inputsFile) == false) {
fsPromises.writeFile(this.inputsFile, '');
}
Expand Down Expand Up @@ -1232,8 +1232,8 @@ class xboxTvDevice {
const isConfigured = 1;

//get input visibility state
const targetVisibility = (savedTargetVisibility[inputTitleId] != undefined) ? savedTargetVisibility[inputTitleId] : (savedTargetVisibility[inputReference] != undefined) ? savedTargetVisibility[inputReference] : (savedTargetVisibility[inputOneStoreProductId] != undefined) ? savedTargetVisibility[inputOneStoreProductId] : 0;
const currentVisibility = targetVisibility;
const currentVisibility = (savedTargetVisibility[inputTitleId] != undefined) ? savedTargetVisibility[inputTitleId] : (savedTargetVisibility[inputReference] != undefined) ? savedTargetVisibility[inputReference] : (savedTargetVisibility[inputOneStoreProductId] != undefined) ? savedTargetVisibility[inputOneStoreProductId] : 0;
const targetVisibility = currentVisibility;

const inputService = new Service.InputSource(accessoryName, 'Input ' + i);
inputService
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Xbox TV",
"name": "homebridge-xbox-tv",
"version": "1.6.46",
"version": "1.7.0",
"description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Xbox game consoles.",
"license": "MIT",
"author": "grzegorz914",
Expand Down

0 comments on commit 24cf64d

Please sign in to comment.