From baa8af58bc3ebdc453bc05cd596b85b1c0c22467 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 22 May 2014 10:28:58 -0400 Subject: [PATCH] hopefully fix #366 delete causing change media --- lib/channel/opts.js | 2 +- lib/channel/playlist.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/channel/opts.js b/lib/channel/opts.js index 9c7450f7..035a9bb3 100644 --- a/lib/channel/opts.js +++ b/lib/channel/opts.js @@ -1,6 +1,6 @@ var ChannelModule = require("./module"); var Config = require("../config"); -var Utilities = require ("../utilities"); +var Utilities = require("../utilities"); function OptionsModule(channel) { ChannelModule.apply(this, arguments); diff --git a/lib/channel/playlist.js b/lib/channel/playlist.js index efe73789..88078211 100644 --- a/lib/channel/playlist.js +++ b/lib/channel/playlist.js @@ -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(); }