From 4f0eecda565ea1060ea7d7d1077c54a74abc3acf Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 17 Jul 2016 15:19:47 +0200 Subject: playout server live 5s in the future -> last-played-Datetime is off by 5s diff --git a/www/js/musicpools.js b/www/js/musicpools.js index 3bd905a..e110818 100644 --- a/www/js/musicpools.js +++ b/www/js/musicpools.js @@ -267,7 +267,7 @@ Rdxport.MusicpoolCartView.prototype.render = function() { imported = format_datetime(new Date(cut.originDatetime)); } playcnt = cut.playCounter; - if (!isNaN(new Date(cut.lastPlayDatetime))) { + if (!isNaN(cut.lastPlayDatetime)) { lastplayed = format_datetime(); } } diff --git a/www/js/rdxport.js b/www/js/rdxport.js index e698493..ceef6be 100644 --- a/www/js/rdxport.js +++ b/www/js/rdxport.js @@ -516,7 +516,7 @@ Rdxport.Cut = function(name, description, cart, length, originDatetime, this.length = $('length', this.xml).text(); this.originDatetime = $('originDatetime', this.xml).text(); this.playCounter = $('playCounter', this.xml).text(); - this.lastPlayDatetime = $('lastPlayDatetime', this.xml).text(); + this.lastPlayDatetime = new Date(new Date($('lastPlayDatetime', this.xml).text()) - 5000); // playout-server live 5s in the future this.cart = arguments[1]; } else { this.name = name; @@ -525,7 +525,7 @@ Rdxport.Cut = function(name, description, cart, length, originDatetime, this.length = length; this.originDatetime = originDatetime; this.playCounter = playCounter; - this.lastPlayDatetime = lastPlayDatetime; + this.lastPlayDatetime = new Date(new Date(lastPlayDatetime) - 5000); // playout-server live 5s in the future } this.number = this.name.substr(-3); this.cartNumber = this.cart.number; diff --git a/www/js/shows.js b/www/js/shows.js index 8f837ba..cf18531 100644 --- a/www/js/shows.js +++ b/www/js/shows.js @@ -348,7 +348,7 @@ Rdxport.ShowCartView.prototype.render = function() { length = msToTimeString(Number(cut.length)); originDatetime = format_datetime(new Date(cut.originDatetime)); playCounter = cut.playCounter; - lastPlayDatetime = format_datetime(new Date(cut.lastPlayDatetime)); + lastPlayDatetime = format_datetime(cut.lastPlayDatetime); } this.$el = this.$el.empty() .attr('id', 'show-cart-' + this.model.number) -- cgit v0.10.2