Fix queue progress bar for youtube playlists
This commit is contained in:
parent
75245e4d98
commit
a00820a4c6
3 changed files with 14 additions and 7 deletions
|
|
@ -3041,11 +3041,16 @@ function showChannelSettings() {
|
|||
// There is a point where this file needed to stop and we have clearly passed
|
||||
// it but let's keep going and see what happens
|
||||
|
||||
function startQueueSpinner(id) {
|
||||
function startQueueSpinner(data) {
|
||||
if ($("#queueprogress").length > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var id = data.id;
|
||||
if (data.type === "yp") {
|
||||
id = "$any";
|
||||
}
|
||||
|
||||
var progress = $("<div/>").addClass("progress").attr("id", "queueprogress")
|
||||
.data("queue-id", id);
|
||||
var progressBar = $("<div/>").addClass("progress-bar progress-bar-striped active")
|
||||
|
|
@ -3060,10 +3065,12 @@ function startQueueSpinner(id) {
|
|||
progress.appendTo($("#addfromurl"));
|
||||
}
|
||||
|
||||
function stopQueueSpinner(id) {
|
||||
if (id && $("#queueprogress").data("queue-id") === id) {
|
||||
$("#queueprogress").remove();
|
||||
} else if (id === null) {
|
||||
function stopQueueSpinner(data) {
|
||||
var shouldRemove = (typeof data === 'object' &&
|
||||
$("#queueprogress").data("queue-id") === data.id);
|
||||
shouldRemove = shouldRemove || data === null;
|
||||
shouldRemove = shouldRemove || $("#queueprogress").data("queue-id") === "$any";
|
||||
if (shouldRemove) {
|
||||
$("#queueprogress").remove();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue