fix: player display bug, continue, sigh
This commit is contained in:
parent
3b104a6f3e
commit
9692570ec2
@ -125,7 +125,10 @@ function displayPlaylist(data) {
|
|||||||
playlist_loading.hide();
|
playlist_loading.hide();
|
||||||
$(".playlist-item").remove();
|
$(".playlist-item").remove();
|
||||||
let items = data.items;
|
let items = data.items;
|
||||||
playlist_items = items;
|
playlist_items = {};
|
||||||
|
for (let i in items){
|
||||||
|
playlist_items[items[i].index] = items[i]
|
||||||
|
}
|
||||||
let length = data.length;
|
let length = data.length;
|
||||||
let start_from = data.start_from;
|
let start_from = data.start_from;
|
||||||
playlist_range_from = start_from;
|
playlist_range_from = start_from;
|
||||||
@ -156,7 +159,7 @@ function displayPlaylist(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
displayActiveItem(data.current_index);
|
displayActiveItem(data.current_index);
|
||||||
updatePlayerInfo(items[data.current_index - data.start_from]);
|
updatePlayerInfo(playlist_items[data.current_index]);
|
||||||
bindPlaylistEvent();
|
bindPlaylistEvent();
|
||||||
playlist_table.animate({ opacity: 1 }, 200);
|
playlist_table.animate({ opacity: 1 }, 200);
|
||||||
});
|
});
|
||||||
@ -236,7 +239,7 @@ function checkForPlaylistUpdate() {
|
|||||||
updatePlaylist();
|
updatePlaylist();
|
||||||
} else {
|
} else {
|
||||||
playlist_current_index = data.current_index;
|
playlist_current_index = data.current_index;
|
||||||
updatePlayerInfo(playlist_items[data.current_index - data.start_from]);
|
updatePlayerInfo(playlist_items[data.current_index]);
|
||||||
displayActiveItem(data.current_index);
|
displayActiveItem(data.current_index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user