Browse Source

noidle fix

master
Ondřej Žára 2 years ago
parent
commit
d65dfa3e6c
  1. 2
      package.json
  2. 8
      queue.js

2
package.json

@ -1,6 +1,6 @@
{
"name": "ws2mpd",
"version": "2.2.0",
"version": "2.2.1",
"description": "",
"main": "index.js",
"scripts": {

8
queue.js

@ -119,8 +119,12 @@ exports.Queue = class extends EventEmitter {
}
add(str) {
if (str == "noidle" && this._current instanceof Idle) {
this._mpd.write(str + "\n");
if (str == "noidle") {
if (this._current instanceof Idle) {
this._mpd.write(str + "\n");
} else {
log("throwing away rogue noidle");
}
return;
}
this._waiting.push(str);

Loading…
Cancel
Save