diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/musicpools.js | 10 | ||||
-rw-r--r-- | www/js/rivendell.rh.js | 2 |
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; |