diff --git a/server/djrandom/frontend/static/player.js b/server/djrandom/frontend/static/player.js index 68ef52317338023abe0e68f551adbadaeb9224f8..29fc8920f1a0263acc39d747a9eb9fec32f09ca4 100644 --- a/server/djrandom/frontend/static/player.js +++ b/server/djrandom/frontend/static/player.js @@ -229,10 +229,12 @@ djr.Player.prototype.mergePlaylistChunks = function() { this.playlist = this.playlist.merge(); // Shuffle the HTML data around (so we don't have to necessarily - // fetch it again from the server). - $('.chunk').each(function(idx) { + // fetch it again from the server). This is done in two steps: + // 1) Copy all .chunk_inner data of chunks > 0 in the first one, + // 2) Change the title of #chunk_0. + $('.chunk .chunk_inner').each(function(idx) { if (idx > 0) { - $('#chunk_0').append($(this).html()); + $('#chunk_0 .chunk_inner').append($(this).html()); $(this).remove(); } });