Question about JSON returned for Playing Artist
#1
I'm building Musicbrainz support into Artlist Slideshow, and I'm trying to future code it a little bit to get the MusicBrainz ID from XBMC via a JSON call.

I am able to use this JSON query to get back two properties, artist name and musicbrainzartistid:

Code:
response = xbmc.executeJSONRPC ( '{"jsonrpc":"2.0", "method":"Player.GetItem", "params":{"playerid":0, "properties":["artist", "musicbrainzartistid"]},"id":1}' )

After a little trial and error, I figured out that the artist property actually has a list of all artists for the playing song (for cases where you have more than one artist for a song).

Code:
artist_names = json.loads(response)['result']['item']['artist']
mbids = json.loads(response)['result']['item']['muiscbrainzartistid']

Without any musicbrainz IDs in my system, I can't answer one question through. Will the second line above return a list of musicbrainz IDs, and will they be in the same order as the artist names (OK, that's two questions)? If so then it's pretty trivial to covert the two lists into a list of tuples. If not, is there some way to get back a list of tuples where the tuple is artist name, musicbrainz ID?
Reply

Logout Mark Read Team Forum Stats Members Help
Question about JSON returned for Playing Artist0