Fixed issue on serverrestart, stocking over the playlist regardless if the player is in private mode or not

This commit is contained in:
Kasper Rynning-Tønnesen
2017-01-26 14:59:42 +01:00
parent c72c2c9a3a
commit 09c75ed8b6
3 changed files with 32 additions and 29 deletions
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+4 -1
View File
@@ -13,11 +13,13 @@ var List = {
switch(msg.type)
{
case "list":
if(full_playlist == undefined || !offline){
List.populate_list(msg.playlist);
if(chromecastAvailable){
Player.sendNext({title: full_playlist[0].title, videoId: full_playlist[0].id});
}
break;
}
case "added":
List.added_song(msg.value);
if(chromecastAvailable){
@@ -279,7 +281,7 @@ var List = {
added_song: function(added){
var now_playing;
if(added != undefined){
if(full_playlist.length !== 0){
now_playing = full_playlist.pop();
}
@@ -302,6 +304,7 @@ var List = {
$(".next_page_hide").css("display", "inline-block");
$(".next_page").css("display", "none");
}
}
},
deleted_song: function(deleted){