Fix /clean

This commit is contained in:
calzoneman 2013-09-30 21:34:40 -05:00
parent 3666b43f7a
commit 0c52c3f17d
1 changed files with 6 additions and 4 deletions

View File

@ -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();