noidle fix
This commit is contained in:
parent
783fa14351
commit
d65dfa3e6c
2 changed files with 7 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "ws2mpd",
|
"name": "ws2mpd",
|
||||||
"version": "2.2.0",
|
"version": "2.2.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
8
queue.js
8
queue.js
|
@ -119,8 +119,12 @@ exports.Queue = class extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
add(str) {
|
add(str) {
|
||||||
if (str == "noidle" && this._current instanceof Idle) {
|
if (str == "noidle") {
|
||||||
this._mpd.write(str + "\n");
|
if (this._current instanceof Idle) {
|
||||||
|
this._mpd.write(str + "\n");
|
||||||
|
} else {
|
||||||
|
log("throwing away rogue noidle");
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._waiting.push(str);
|
this._waiting.push(str);
|
||||||
|
|
Loading…
Reference in a new issue