diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2012-12-21 22:40:44 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2012-12-21 22:40:44 +0100 |
commit | ac3c89bf8b9afa7ba175c68d92d4d1b9ed7448ac (patch) | |
tree | 2cf32e141910b440648a5b175560dff6b89d8dc9 /static | |
parent | e745764fc55043f6107f68986f82845310537fee (diff) |
Don't try to add existing tracks to playlist.
Diffstat (limited to 'static')
-rw-r--r-- | static/playlist.js | 4 |
1 files changed, 4 insertions, 0 deletions
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); |