diff --git a/static/js/hostcontroller.js b/static/js/hostcontroller.js index 32c65087..dd7d95fc 100755 --- a/static/js/hostcontroller.js +++ b/static/js/hostcontroller.js @@ -27,7 +27,7 @@ socket.on("id", function(id) chan = arr[1].toLowerCase(); $("#chan").html(chan.substring(0,1).toUpperCase()+chan.substring(1).toLowerCase()); socket.on(chan.toLowerCase(), function(msg){ - populate_list(msg, false); + channel_function(msg); }); setup_youtube_listener(chan); diff --git a/static/js/list.js b/static/js/list.js index 162cff23..a6a89551 100755 --- a/static/js/list.js +++ b/static/js/list.js @@ -16,6 +16,11 @@ var check = false; return check; }; socket.on(chan.toLowerCase(), function(msg){ + channel_function(msg); +}); + +function channel_function(msg) +{ if(msg[0] == "list") { full_playlist = msg[1]; @@ -58,7 +63,7 @@ socket.on(chan.toLowerCase(), function(msg){ populate_list(full_playlist); } -}); +} socket.on("skipping", function(obj) {