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++) {