Minor refactor

This commit is contained in:
Omar Roth 2019-06-07 19:56:41 -05:00
parent f065a21542
commit 8c944815bc
No known key found for this signature in database
GPG key ID: B8254FB7EC3D37F2
18 changed files with 154 additions and 138 deletions

View file

@ -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++);
}
}