Added shufflefunction for when in offline

This commit is contained in:
Kasper Rynning-Tønnesen
2017-01-26 13:34:46 +01:00
parent 0790002b6a
commit d665b59c7a
2 changed files with 11 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -238,7 +238,16 @@ var Admin = {
shuffle: function() shuffle: function()
{ {
socket.emit('shuffle', adminpass !== undefined ? adminpass : ""); if(!offline){
socket.emit('shuffle', adminpass !== undefined ? adminpass : "");
} else {
for(var x = 0; x < full_playlist.length; x++){
var num = Math.floor(Math.random()*1000000);
full_playlist[x].added = num;
}
List.sortList();
List.populate_list(full_playlist);
}
}, },
get_admin:function() get_admin:function()