Songkick API key now properly stored in config.ini (and empty by default)

Added possibility to filter Songkick results per location (so far using a metro-area id)
This commit is contained in:
gotson
2014-03-28 17:37:19 +08:00
parent 863ad41f7c
commit 44acaf7599
4 changed files with 56 additions and 5 deletions

View File

@@ -178,7 +178,14 @@
$.getJSON("http://api.songkick.com/api/3.0/artists/mbid:${artist['ArtistID']}/calendar.json?apikey=${headphones.SONGKICK_APIKEY}&jsoncallback=?",
function(data){
if (data['resultsPage'].totalEntries >= 1) {
if (data['resultsPage'].totalEntries >= 1) {
if( ${headphones.SONGKICK_FILTER_ENABLED} ) {
data.resultsPage.results.event = $.grep(data.resultsPage.results.event, function(element,index){
return element.venue.metroArea.id == ${headphones.SONGKICK_LOCATION};
});
}
var tourDate;
calendarDomNode.show();