From 58313a17212ab3322313654d4909687502c77d9c Mon Sep 17 00:00:00 2001 From: RandomByte Date: Sun, 8 Sep 2013 21:09:48 +0200 Subject: [PATCH] Added random number (0-100) to lastfm api jsonp callback-name to prevent undefined callbacks because they have been created at the exact same time. Now all covers are loading correctly --- webclient/js/lastfm.api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webclient/js/lastfm.api.js b/webclient/js/lastfm.api.js index e831b69..5336968 100755 --- a/webclient/js/lastfm.api.js +++ b/webclient/js/lastfm.api.js @@ -90,7 +90,7 @@ function LastFM(options){ /* Cross-domain GET request (JSONP). */ else{ /* Get JSONP callback name. */ - var jsonp = 'jsonp' + new Date().getTime(); + var jsonp = 'jsonp' + new Date().getTime() + Math.floor(Math.random()*101); /* Calculate cache hash. */ var hash = auth.getApiSignature(params);