From 6a9c9f9235d8e3a4d1b3e1cbaf1c408d8ce84432 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Fri, 5 Jul 2013 23:34:04 -0400 Subject: [PATCH] Fix voteskips --- channel.js | 5 +++++ playlist.js | 1 + 2 files changed, 6 insertions(+) diff --git a/channel.js b/channel.js index e1e1a55c..9df83a5d 100644 --- a/channel.js +++ b/channel.js @@ -977,6 +977,11 @@ Channel.prototype.broadcastDrinks = function() { /* REGION Playlist Stuff */ +Channel.prototype.onVideoChange = function () { + this.voteskip = false; + this.broadcastVoteskipUpdate(); +} + // The server autolead function function mediaUpdate(chan, id) { // Bail cases - video changed, someone's leader, no video playing diff --git a/playlist.js b/playlist.js index 1164f178..c69455d4 100644 --- a/playlist.js +++ b/playlist.js @@ -42,6 +42,7 @@ function Playlist(chan) { chan.sendAll("mediaUpdate", m.timeupdate()); }); this.on("changeMedia", function(m) { + chan.onVideoChange(); chan.sendAll("setCurrent", pl.current.uid); chan.sendAll("changeMedia", m.fullupdate()); });