Kodi Community Forum

Full Version: How to format extendedinfo link to get location specific concert data?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does anyone have an idea how to get location specific concert data with the extendedinfo script?
If I use this command below I get data for across the United States.
RunScript(script.extendedinfo,info=NearEvents,tag=rock)

My question is how would I format the command link to get location specific data?
I know it is possible because if I edit the script on line 194 and manually enter lat. and lon. coordinates for say "Las Vegas" in between the quotes here on the top line...
PHP Code:
def GetNearEvents(tag False,festivalsonly Falselat ""lon ""):
    if 
festivalsonly:
        
festivalsonly "1"
    
else:
        
festivalsonly "0"
    
url 'method=geo.getevents&festivalsonly=%s&limit=40' % (festivalsonly)
    if 
tag:
        
url url '&tag=%s' % (urllib.quote_plus(tag))  
    if 
lat:
        
url url '&lat=%s&long=%s' % (lat,lon)  # &distance=60
    
results GetLastFMData(url)
    if 
True:
        return 
HandleLastFMEventResult(results)
    else:
        return [] 
I can get data for Las Vegas or for wherever I choose. I just can't figure out how to format the link to get it without editing the extendedinfo script.
I have tried these below and just about every other combination I could think of trying but to no avail, so I thought just maybe someone here would know. Thanks.
RunScript(script.extendedinfo,info=NearEvents,location=las vegas,tag=rock)
RunScript(script.extendedinfo,info=NearEvents,tag=rock,location=las vegas)
RunScript(script.extendedinfo,info=NearEvents,tag=rock,lat=36.255123,lon=-115.238349)