Fixed error with searchSpotify not defined

This commit is contained in:
Kasper Rynning-Tønnesen
2017-01-07 17:35:53 +01:00
parent 7f1d3dd51c
commit d66c07bd46
2 changed files with 6 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -472,7 +472,7 @@ var List = {
var retryAfter = err.getResponseHeader("Retry-After"); var retryAfter = err.getResponseHeader("Retry-After");
retryAfter = parseInt(retryAfter, 10); retryAfter = parseInt(retryAfter, 10);
setTimeout(function(){ setTimeout(function(){
searchSpotify(curr_song); List.searchSpotify(curr_song);
}, retryAfter * 1000); }, retryAfter * 1000);
} }
}, },
@@ -506,6 +506,7 @@ var List = {
if(decodeURIComponent(track).indexOf(data.artists[0].name.toLowerCase()) >= 0 && decodeURIComponent(track).indexOf(data.name.toLowerCase()) >= 0){ if(decodeURIComponent(track).indexOf(data.artists[0].name.toLowerCase()) >= 0 && decodeURIComponent(track).indexOf(data.name.toLowerCase()) >= 0){
found = true; found = true;
List.uris.push(data.uri); List.uris.push(data.uri);
Helper.log("Found", track);
//List.num_songs = List.num_songs + 1; //List.num_songs = List.num_songs + 1;
return false; return false;
} else { } else {
@@ -519,6 +520,7 @@ var List = {
} }
found = true; found = true;
List.uris.push(data.uri); List.uris.push(data.uri);
Helper.log("Found", track);
//List.num_songs = List.num_songs + 1; //List.num_songs = List.num_songs + 1;
return false; return false;
} }
@@ -526,6 +528,7 @@ var List = {
if(!found){ if(!found){
List.not_found.push(original_track); List.not_found.push(original_track);
List.num_songs = List.num_songs + 1; List.num_songs = List.num_songs + 1;
Helper.log("Didn't find", original_track);
} }
if(List.num_songs + List.uris.length == full_playlist.length){ if(List.num_songs + List.uris.length == full_playlist.length){
if(List.uris.length > 100){ if(List.uris.length > 100){