hopefully fix #366 delete causing change media

This commit is contained in:
Erik 2014-05-22 10:28:58 -04:00
parent 4f7e4ad65e
commit baa8af58bc
2 changed files with 3 additions and 3 deletions

View File

@ -493,7 +493,7 @@ PlaylistModule.prototype.handleDelete = function (user, data) {
self.channel.activeLock.lock();
this.semaphore.queue(function (lock) {
if (self._delete(data)) {
self.channel.logger.log("[playlist] " + user.name + " deleted " +
self.channel.logger.log("[playlist] " + user.getName() + " deleted " +
plitem.media.title);
}
@ -788,7 +788,7 @@ PlaylistModule.prototype._delete = function (uid) {
if (self.current === item && item === next) {
self.current = null;
} else {
} else if (self.current === item) {
self.current = next;
self.startPlayback();
}