summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--static/playlist.js4
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);