persist queue on shuffle. closes #190
This commit is contained in:
parent
cc7183ce53
commit
259f247290
1 changed files with 5 additions and 3 deletions
|
|
@ -925,11 +925,13 @@ Player.prototype.shufflePlaylist = function() {
|
|||
shuffle(this.tracksInOrder);
|
||||
// fix sortKey and index properties
|
||||
var nextSortKey = keese(null, null);
|
||||
this.tracksInOrder.forEach(function(track, index) {
|
||||
track.index = index;
|
||||
for (var i = 0; i < this.tracksInOrder.length; i += 1) {
|
||||
var track = this.tracksInOrder[i];
|
||||
track.index = i;
|
||||
track.sortKey = nextSortKey;
|
||||
this.persistPlaylistItem(track);
|
||||
nextSortKey = keese(nextSortKey, null);
|
||||
});
|
||||
}
|
||||
playlistChanged(this);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue