mirror of https://github.com/calzoneman/sync.git
Fix potential cause for playlist timer problem
This commit is contained in:
parent
7d2015620a
commit
5cde74cbd4
|
@ -1049,7 +1049,12 @@ PlaylistModule.prototype.startPlayback = function (time) {
|
||||||
self.channel.notifyModules("onMediaChange", [self.current.media]);
|
self.channel.notifyModules("onMediaChange", [self.current.media]);
|
||||||
|
|
||||||
/* Only start the timer if the media item is not live, i.e. has a duration */
|
/* Only start the timer if the media item is not live, i.e. has a duration */
|
||||||
if (media.seconds > 0) {
|
/*
|
||||||
|
* 2015-01-22: Don't start the timer if there is an active leader or if
|
||||||
|
* the timer is already running. Both are possible since checkModules()
|
||||||
|
* is asynchronous
|
||||||
|
*/
|
||||||
|
if (media.seconds > 0 && !self.leader && !self._leadInterval) {
|
||||||
self._lastUpdate = Date.now();
|
self._lastUpdate = Date.now();
|
||||||
self._leadInterval = setInterval(function() {
|
self._leadInterval = setInterval(function() {
|
||||||
self._leadLoop();
|
self._leadLoop();
|
||||||
|
|
Loading…
Reference in New Issue