diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-06-07 19:56:41 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-06-07 21:13:50 -0500 |
| commit | 8c944815bcb1630739f0f5ba1994e051e67527e7 (patch) | |
| tree | 4cb778c37d316a547e6981ed87f95631e4bb8dc8 /assets/js/embed.js | |
| parent | f065a21542fd9d7587b89c426327c3c83a24c2bc (diff) | |
| download | invidious-8c944815bcb1630739f0f5ba1994e051e67527e7.tar.gz invidious-8c944815bcb1630739f0f5ba1994e051e67527e7.tar.bz2 invidious-8c944815bcb1630739f0f5ba1994e051e67527e7.zip | |
Minor refactor
Diffstat (limited to 'assets/js/embed.js')
| -rw-r--r-- | assets/js/embed.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/assets/js/embed.js b/assets/js/embed.js index d2116b2e..283bc06d 100644 --- a/assets/js/embed.js +++ b/assets/js/embed.js @@ -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++); } } |
