diff --git a/lib/channel/playlist.js b/lib/channel/playlist.js index 9cb5ba8b..c5b99102 100644 --- a/lib/channel/playlist.js +++ b/lib/channel/playlist.js @@ -235,6 +235,7 @@ PlaylistModule.prototype.onUserPart = function (user) { if (!this._leadInterval) { this._lastUpdate = Date.now(); this._leadInterval = setInterval(this._leadLoop.bind(this), 1000); + this._leadLoop(); } } } @@ -720,17 +721,22 @@ PlaylistModule.prototype.handleAssignLeader = function (user, data) { name: old.getName(), rank: old.account.effectiveRank }); + this.channel.logger.log("[mod] " + user.getName() + " removed leader from " + old.getName()); } if (!name) { this.channel.broadcastAll("setLeader", ""); this.channel.logger.log("[playlist] Resuming autolead"); - if (!this._leadInterval) { - this._lastUpdate = Date.now(); - this._leadInterval = setInterval(this._leadLoop.bind(this), 1000); - } + if (this.current !== null) { + this.current.media.paused = false; + if (!this._leadInterval) { + this._lastUpdate = Date.now(); + this._leadInterval = setInterval(this._leadLoop.bind(this), 1000); + this._leadLoop(); + } + } return; }