Added toast for when new song is added, and changed so the playlistpage is switched to 1 on host-mode enabling

This commit is contained in:
Kasper Rynning-Tønnesen
2018-06-07 14:25:17 +02:00
parent 37f71d5f69
commit 28e48c59d6
2 changed files with 5 additions and 1 deletions

View File

@@ -360,6 +360,10 @@ var List = {
full_playlist.push(now_playing);
}
if(hostMode) {
M.toast({html: "<div style='display:flex;'><img style='height:100px;align-self:center;' src='" + added.thumbnail + "' /><div style='padding-left:32px;padding-right:32px;'><p>New song added</p><p>" + added.title + "</p></div></div>", displayLength: 10000});
document.querySelector("#toast-container").setAttribute("style", "z-index: 99999999999 !important");
}
if(added.source != "soundcloud" && document.querySelectorAll("#suggested-"+added.id).length > 0) {
number_suggested = number_suggested - 1;
if(number_suggested < 0) number_suggested = 0;