homebridge-xbox-tv 2.7.7-beta.0 → 2.7.7-beta.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/index.js +2 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -132,18 +132,14 @@ class XBOXDEVICE {
|
|
|
132
132
|
this.inputsNamesFile = `${this.prefDir}/inputsNames_${this.host.split('.').join('')}`;
|
|
133
133
|
this.inputsTargetVisibilityFile = `${this.prefDir}/inputsTargetVisibility_${this.host.split('.').join('')}`;
|
|
134
134
|
|
|
135
|
+
//check if the directory or files exists, if not then create it
|
|
135
136
|
const object = JSON.stringify({});
|
|
136
|
-
const array = JSON.stringify([]);
|
|
137
|
-
//check if the directory exists, if not then create it
|
|
138
137
|
if (!fs.existsSync(this.prefDir)) {
|
|
139
138
|
fs.mkdirSync(this.prefDir);
|
|
140
139
|
}
|
|
141
140
|
if (!fs.existsSync(this.authTokenFile)) {
|
|
142
141
|
fs.writeFileSync(this.authTokenFile, object);
|
|
143
142
|
}
|
|
144
|
-
if (!fs.existsSync(this.inputsFile)) {
|
|
145
|
-
fs.writeFileSync(this.inputsFile, array);
|
|
146
|
-
}
|
|
147
143
|
if (!fs.existsSync(this.inputsNamesFile)) {
|
|
148
144
|
fs.writeFileSync(this.inputsNamesFile, object);
|
|
149
145
|
}
|
|
@@ -777,7 +773,7 @@ class XBOXDEVICE {
|
|
|
777
773
|
this.televisionService.addLinkedService(inputService);
|
|
778
774
|
accessory.addService(inputService);
|
|
779
775
|
} else {
|
|
780
|
-
this.log(`Device: ${this.host} ${accessoryName}, ${
|
|
776
|
+
this.log(`Device: ${this.host} ${accessoryName}, name: ${inputName}, reference: ${inputReference}, missing!!!`);
|
|
781
777
|
|
|
782
778
|
};
|
|
783
779
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Xbox TV",
|
|
3
3
|
"name": "homebridge-xbox-tv",
|
|
4
|
-
"version": "2.7.7-beta.
|
|
4
|
+
"version": "2.7.7-beta.2",
|
|
5
5
|
"description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Xbox game consoles.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|