From 4809a3db00e1e22b109b6158f9024d510f29117e Mon Sep 17 00:00:00 2001 From: OurFlagIsMined Date: Sun, 25 Oct 2015 19:52:34 -0400 Subject: [PATCH] more than one Play click deleted a playlist item If two people tried to play the same playlist item, before the playlist updated, it would delete instead of playing. The same would also happen if the play button was double-clicked instead of single-clicked. Also, the active item's play button functioned as a delete button. Fully tested. Still removes the item (if it was added as temporary) when it finishes playing, or if the play button of a *different* item is clicked. --- src/channel/playlist.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/channel/playlist.js b/src/channel/playlist.js index 20929da3..75e98bc1 100644 --- a/src/channel/playlist.js +++ b/src/channel/playlist.js @@ -646,7 +646,7 @@ PlaylistModule.prototype.handleJumpTo = function (user, data) { this.startPlayback(); this.channel.logger.log("[playlist] " + user.getName() + " skipped " + title); - if (old && old.temp) { + if (old && old.temp && old !== to) { this._delete(old.uid); } }