summaryrefslogtreecommitdiff
path: root/www/js/musicpools.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/musicpools.js')
-rw-r--r--www/js/musicpools.js10
1 files changed, 7 insertions, 3 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>');