mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-02 06:26:27 -04:00
Minor refactor
This commit is contained in:
parent
f065a21542
commit
8c944815bc
18 changed files with 154 additions and 138 deletions
|
@ -1,5 +1,5 @@
|
|||
function get_playlist(plid, timeouts = 0) {
|
||||
if (timeouts > 10) {
|
||||
function get_playlist(plid, timeouts = 1) {
|
||||
if (timeouts >= 10) {
|
||||
console.log('Failed to pull playlist');
|
||||
return;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ function get_playlist(plid, timeouts = 0) {
|
|||
}
|
||||
|
||||
xhr.ontimeout = function () {
|
||||
console.log('Pulling playlist timed out.');
|
||||
console.log('Pulling playlist timed out... ' + timeouts + '/10');
|
||||
get_playlist(plid, timeouts++);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue