From bee58b421df98a5dd183f49ba6061d89f9de4374 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sat, 16 Mar 2013 19:58:38 -0500 Subject: [PATCH] Fix livestream bug --- channel.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/channel.js b/channel.js index 93590b2c..a71ab10e 100644 --- a/channel.js +++ b/channel.js @@ -371,7 +371,7 @@ Channel.prototype.playNext = function() { idx: this.currentPosition }); // Enable autolead for non-twitch - if(this.leader == null && this.currentMedia.type != "tw") { + if(this.leader == null && this.currentMedia.type != "tw" && this.currentMedia.type != "li") { time = new Date().getTime(); channelVideoUpdate(this, this.currentMedia.id); } @@ -561,8 +561,12 @@ Channel.prototype.sendRecentChat = function(user) { // Send a sync packet Channel.prototype.sendMediaUpdate = function(user) { - if(this.currentMedia != null) + if(this.currentMedia != null) { user.socket.emit('mediaUpdate', this.currentMedia.packupdate()); + } + else { + console.log('currentMedia is null'); + } } // Sent when someone logs in, to add them to the user list