From f992d625fb976f5b22ba847464e3dc255b1bb4c4 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Tue, 4 Mar 2014 11:57:05 -0600 Subject: [PATCH] Fixes --- lib/channel.js | 2 +- lib/server.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/channel.js b/lib/channel.js index c980ab12..e4bc9dcb 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -1899,7 +1899,7 @@ Channel.prototype.deleteMedia = function (uid, callback) { */ Channel.prototype.setTemp = function (uid, temp) { var item = this.playlist.items.find(uid); - if (item == null) { + if (item === false) { return; } diff --git a/lib/server.js b/lib/server.js index ce2002db..a2db6f97 100644 --- a/lib/server.js +++ b/lib/server.js @@ -158,6 +158,8 @@ Server.prototype.unloadChannel = function (chan) { chan.saveState(); } + chan.logger.log("[init] Channel shutting down"); + chan.playlist.die(); chan.logger.close(); for (var i = 0; i < this.channels.length; i++) {