summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-07-17 13:19:47 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-07-17 13:27:26 (GMT)
commit4f0eecda565ea1060ea7d7d1077c54a74abc3acf (patch)
treeb2c303d5c753e88d76a3f96ce39d2df539e977b0
parente7071e58293c926553e9fbfcad5cc261a189aa6a (diff)
playout server live 5s in the future -> last-played-Datetime is off by 5s
-rw-r--r--www/js/musicpools.js2
-rw-r--r--www/js/rdxport.js4
-rw-r--r--www/js/shows.js2
3 files changed, 4 insertions, 4 deletions
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)