summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Grassberger <petertheone@gmail.com>2016-02-02 19:06:44 (GMT)
committerPeter Grassberger <petertheone@gmail.com>2016-02-02 19:06:44 (GMT)
commit5370b3db0d4b482a61db3b3bd7b6ff88ff0d6dda (patch)
treea323d7f124e385ee2d5ec2462533c70029043e6c
parent070becf035f7c1b492cca1213b026563098d7f53 (diff)
musicpools: fix originDatetime and lastPlayDatetime render
-rw-r--r--www/js/musicpools.js10
-rw-r--r--www/js/rivendell.rh.js2
2 files changed, 8 insertions, 4 deletions
diff --git a/www/js/musicpools.js b/www/js/musicpools.js
index bf906d0..7a880fd 100644
--- a/www/js/musicpools.js
+++ b/www/js/musicpools.js
@@ -204,9 +204,13 @@ Rivendell.MusicpoolCartView.prototype.render = function() {
title = this.model.cuts[0].description;
length = msToTimeString(Number(cut.length));
- imported = format_datetime(new Date(cut.originDatetime));
- playcnt = cut.playcnt;
- lastplayed = format_datetime(new Date(cut.lastPlayDatetime));
+ if (!isNaN(new Date(cut.originDatetime))) {
+ imported = format_datetime(new Date(cut.originDatetime));
+ }
+ playcnt = cut.playCounter;
+ if (!isNaN(new Date(cut.lastPlayDatetime))) {
+ lastplayed = format_datetime();
+ }
}
var deleteButton = $('<button class="btn btn-danger btn-mini"><i class="icon-trash icon-white"></i> Löschen</button>');
diff --git a/www/js/rivendell.rh.js b/www/js/rivendell.rh.js
index 8e58d01..a41ccd3 100644
--- a/www/js/rivendell.rh.js
+++ b/www/js/rivendell.rh.js
@@ -53,7 +53,7 @@ Rivendell.Rivendell.prototype.listDropboxes = function(type, success) {
return $.post(this.listDropboxesEndpoint, command, success, 'xml');
};
-// see: https://github.com/ElvishArtisan/rivendell/pull/73
+// see: https://github.com/ElvishArtisan/rivendell/pull/100
Rivendell.Rivendell.prototype.addAndEditCut = function(cartNumber, options, success) {
options.COMMAND = 10;
options.LOGIN_NAME = this.username;