From ac3c89bf8b9afa7ba175c68d92d4d1b9ed7448ac Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 21 Dec 2012 22:40:44 +0100 Subject: Don't try to add existing tracks to playlist. --- static/playlist.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/playlist.js b/static/playlist.js index bd323d3..90167ce 100644 --- a/static/playlist.js +++ b/static/playlist.js @@ -51,6 +51,10 @@ $(function(){ }, add: function(item) { item.order_id = items.length+1; + // Don't add existing items to playlist. + if(items.get(item.id)) { + return; + } var model = items.create(item); if(items.indexOf(model) < 2) { sound_hint(model); -- cgit v1.2.3