Skip to content
Snippets Groups Projects
Commit 6637c257 authored by ale's avatar ale
Browse files

tiny fix to allSongs()

parent bae35e37
No related branches found
No related tags found
No related merge requests found
...@@ -101,11 +101,12 @@ djr.Playlist = function(uuid) { ...@@ -101,11 +101,12 @@ djr.Playlist = function(uuid) {
// Return an array with all songs, in order. // Return an array with all songs, in order.
djr.Playlist.prototype.allSongs = function() { djr.Playlist.prototype.allSongs = function() {
var songs = []; var songs = [], i, j;
$.each(this.chunks, function(idx, chunk_id) { for (i = 0; i < this.chunks.length; i++) {
$.each(this.chunk_map[chunk_id].songs, function(idx2, song) { for (j = 0; j < this.chunk_map[this.chunks[chunk_id]].songs.length; j++) {
songs.push(song); songs.push(this.chunk_map[this.chunks[chunk_id]].songs[j]);
})}); }
}
return songs; return songs;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment