From d0927504adf4ddec083929bb22d65bf2dcd8e409 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Sun, 24 Jul 2011 16:51:42 +0100 Subject: [PATCH] tiny fix --- server/djrandom/frontend/static/player.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/djrandom/frontend/static/player.js b/server/djrandom/frontend/static/player.js index 3e739f6..a27642c 100644 --- a/server/djrandom/frontend/static/player.js +++ b/server/djrandom/frontend/static/player.js @@ -112,12 +112,11 @@ djr.Playlist.prototype.allSongs = function() { // Creates a new chunk with only unique songs. djr.Playlist.prototype.createUniqueChunk = function(songs, title) { var songs = [], i; - for (i = 0; i < playlist_chunk.songs.length; i++) { - var song = playlist_chunk.songs[i]; - if (this.song_map[song] != null) { + for (i = 0; i < songs.length; i++) { + if (this.song_map[song[i]] != null) { continue; } - songs.push(song); + songs.push(song[i]); } if (songs.length > 0) { return new djr.PlaylistChunk(songs, title); -- GitLab