mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed error with adding new song
This commit is contained in:
2
static/dist/embed.min.js
vendored
2
static/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
2
static/dist/main.min.js
vendored
2
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -90,10 +90,16 @@ var List = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
added_song: function(added){
|
added_song: function(added){
|
||||||
|
var now_playing;
|
||||||
|
|
||||||
|
if(full_playlist.length !== 0){
|
||||||
now_playing = full_playlist.pop();
|
now_playing = full_playlist.pop();
|
||||||
|
}
|
||||||
full_playlist.push(added);
|
full_playlist.push(added);
|
||||||
List.sortList();
|
List.sortList();
|
||||||
|
if(now_playing){
|
||||||
full_playlist.push(now_playing);
|
full_playlist.push(now_playing);
|
||||||
|
}
|
||||||
$("#suggested-"+added.id).remove();
|
$("#suggested-"+added.id).remove();
|
||||||
if(List.empty){
|
if(List.empty){
|
||||||
List.empty = false;
|
List.empty = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user