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.
This commit is contained in:
OurFlagIsMined 2015-10-25 19:52:34 -04:00
parent b2a9c9c7a8
commit 4809a3db00
1 changed files with 1 additions and 1 deletions

View File

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