homebridge-xbox-tv 3.0.3 → 3.0.4
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/restful.js +2 -2
- package/src/xboxdevice.js +6 -6
package/package.json
CHANGED
package/src/restful.js
CHANGED
|
@@ -37,7 +37,7 @@ class RestFul extends EventEmitter {
|
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
} catch (error) {
|
|
40
|
-
this.emit('error', `RESTful error: ${error}`)
|
|
40
|
+
this.emit('error', `RESTful Connect error: ${error}`)
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
|
|
@@ -65,7 +65,7 @@ class RestFul extends EventEmitter {
|
|
|
65
65
|
this.restFulData.status = data;
|
|
66
66
|
break;
|
|
67
67
|
default:
|
|
68
|
-
this.emit('
|
|
68
|
+
this.emit('error', `RESTFul update unknown path: ${path}, data: ${data}`)
|
|
69
69
|
break;
|
|
70
70
|
};
|
|
71
71
|
const emitDebug = this.restFulDebug ? this.emit('debug', `RESTFul update path: ${path}, data: ${JSON.stringify(data, null, 2)}`) : false;
|
package/src/xboxdevice.js
CHANGED
|
@@ -187,7 +187,7 @@ class XboxDevice extends EventEmitter {
|
|
|
187
187
|
this.emit('debug', debug);
|
|
188
188
|
})
|
|
189
189
|
.on('warn', (warn) => {
|
|
190
|
-
this.emit('
|
|
190
|
+
this.emit('warn', warn);
|
|
191
191
|
})
|
|
192
192
|
.on('error', (error) => {
|
|
193
193
|
this.emit('error', error);
|
|
@@ -334,11 +334,11 @@ class XboxDevice extends EventEmitter {
|
|
|
334
334
|
this.restFulConnected = true;
|
|
335
335
|
this.emit('message', message);
|
|
336
336
|
})
|
|
337
|
-
.on('error', (error) => {
|
|
338
|
-
this.emit('error', error);
|
|
339
|
-
})
|
|
340
337
|
.on('debug', (debug) => {
|
|
341
338
|
this.emit('debug', debug);
|
|
339
|
+
})
|
|
340
|
+
.on('error', (error) => {
|
|
341
|
+
this.emit('warn', error);
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
344
|
|
|
@@ -426,7 +426,7 @@ class XboxDevice extends EventEmitter {
|
|
|
426
426
|
this.emit('debug', debug);
|
|
427
427
|
})
|
|
428
428
|
.on('error', (error) => {
|
|
429
|
-
this.emit('
|
|
429
|
+
this.emit('warn', error);
|
|
430
430
|
});
|
|
431
431
|
};
|
|
432
432
|
|
|
@@ -469,7 +469,7 @@ class XboxDevice extends EventEmitter {
|
|
|
469
469
|
this.emit('debug', debug);
|
|
470
470
|
})
|
|
471
471
|
.on('warn', (warn) => {
|
|
472
|
-
this.emit('
|
|
472
|
+
this.emit('warn', warn);
|
|
473
473
|
})
|
|
474
474
|
.on('error', (error) => {
|
|
475
475
|
this.emit('error', error);
|