I am having the same issue - no matter what I try the next item in the list will not be queued. I verified my XBMC settings. I even tried pulling the final URL destination using urllib2 (since the URL i'm scraping involves a re-direct) and giving that to the item. The scraping of the redirection added a long delay, and ended up not solving it.
I've also added in xbmcplugin.setContent(content="audio") tags throughout items, and folder structures. The addon.xml is advertising it provides audio. Not sure what else to do. I did read one forum post that indicated they were able to get around the bug by using setresolvedURL commands, but I couldn't make that work at all.
I pull in a json file, parse it, clean it up, and then decode it. I'm sure there are better ways, but I've (just now) taught myself some python basics.
Relevant snippits of code:
Code:
def INDEX(url):
req = urllib2.Request(url)
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
response = urllib2.urlopen(req)
raw_json=response.read()
response.close()
parsed_json=json.loads(raw_json)
del parsed_json['version']
print 'Parsed_Json_output'
decoded_json =_decode_dict(parsed_json)
print 'decoded_json_output'
playlist = sortedDictValues1(decoded_json)
print 'Sorted_playlist_output'
xbmcplugin.setContent(handle=int(sys.argv[1]), content="audio" )
for x in playlist:
artist = x['artist']
title = x['title']
url = x['stream_pub']
thumb = x['thumb_url_large']
name = artist + ' - ' + title
addLink(name,url,thumb)
Code:
def addLink(name,url,iconimage):
xbmcplugin.setContent(handle=int(sys.argv[1]), content="audio" )
ok=True
liz=xbmcgui.ListItem(label=name,thumbnailImage=iconimage, path=url)
liz.setProperty("mimetype", 'audio/mpeg')
liz.setInfo("music", {"title": name,})
liz.setProperty('IsPlayable','true')
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz,isFolder=False)
return ok
def addDir(name,url,mode,iconimage):
xbmcplugin.setContent(handle=int(sys.argv[1]), content="audio" )
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)
ok=True
liz=xbmcgui.ListItem(name,iconImage="DefaultFolder.png",thumbnailImage=iconimage)
liz.setInfo( type="music", infoLabels={ "Title": name } )
liz.setProperty('IsPlayable','true')
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
return ok