From 0c52c3f17d0756d0f4bf39fba3407c92e62579c9 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Mon, 30 Sep 2013 21:34:40 -0500 Subject: [PATCH] Fix /clean --- lib/playlist.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/playlist.js b/lib/playlist.js index 765d5ab8..e8ff7772 100644 --- a/lib/playlist.js +++ b/lib/playlist.js @@ -423,10 +423,12 @@ Playlist.prototype.clean = function (filter) { if (count < matches.length) { var uid = matches[count].uid; count++; - self.channel.sendAll("delete", { - uid: uid - }); - self.remove(uid, deleteNext); + if (self.remove(uid)) { + self.channel.sendAll("delete", { + uid: uid + }); + } + deleteNext(); } else { // refresh meta only once, at the end self.channel.broadcastPlaylistMeta();