(2019-09-27, 10:38)DaveBlake Wrote: [ -> ]Item art gets returned in a hierarchy - song has album and both song and album artist(s) art, album has album artist(s) art, artist just artist art. JSON will return the album art (of all types including "discart") for an artist when the albums (and art) for that artist are requested, but I don't know if a skin can do that Mike.
Thanks Dave, I know skins can't get JSON but I was thinking adding something to script.skin.info.service which I maintain on the Kodi repo.
I'm am still in the early stages of learning python but I was trying to get a similiar JSON response like I get for movie sets to populate window properties not yet available in Kodi core.
Code:
json_response = Get_JSON_response('{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovieSetDetails", "params": {"setid": %s, "properties": [ "thumbnail" ], "movies": { "properties": [ "rating", "art", "file", "year", "director", "writer", "genre", "thumbnail", "runtime", "studio", "mpaa", "plotoutline", "plot", "country", "streamdetails"], "sort": { "order": "ascending", "method": "year" }} },"id": 1 }' % dbid)
Currently I am using this:
Code:
json_response = Get_JSON_response('{"jsonrpc": "2.0", "method": "AudioLibrary.GetAlbums", "params": {"properties": ["title", "year", "albumlabel", "playcount", "thumbnail"], "sort": { "method": "label" }, "filter": {"artistid": %s} }, "id": 1}' % dbid)]
Would I just be able to add:
Code:
, "albums": { "properties": ["art"]
Or just ["art"] to "params": {"properties":
EDIT: Answered my own question. Adding "Art" adds all the art
Code:
"id": 1,
"jsonrpc": "2.0",
"result": {
"albums": [
{
"albumid": 361,
"albumlabel": "",
"art": {
"artist.clearlogo": "image://C%3a%5cKodi%20Artist%20Info%5cStory%20of%20the%20Year%5cclearlogo.png/",
"artist.fanart": "image://C%3a%5cKodi%20Artist%20Info%5cStory%20of%20the%20Year%5cfanart.jpg/",
"artist.fanart1": "image://C%3a%5cKodi%20Artist%20Info%5cStory%20of%20the%20Year%5cfanart1.jpg/",
"artist.fanart2": "image://C%3a%5cKodi%20Artist%20Info%5cStory%20of%20the%20Year%5cfanart2.jpg/",
"artist.fanart3": "image://C%3a%5cKodi%20Artist%20Info%5cStory%20of%20the%20Year%5cfanart3.jpg/",
"artist.fanart4": "image://C%3a%5cKodi%20Artist%20Info%5cStory%20of%20the%20Year%5cfanart4.jpg/",
"artist.thumb": "image://D%3a%5cMusic%20Collection%5cSTORY%20OF%20THE%20YEAR%5cfolder.jpg/",
"cdart": "image://D%3a%5cMusic%20Collection%5cSTORY%20OF%20THE%20YEAR%5c(2005)%20IN%20THE%20WAKE%20OF%20DETERMINATION%5ccdart.png/",
"discart": "image://D%3a%5cMusic%20Collection%5cSTORY%20OF%20THE%20YEAR%5c(2005)%20IN%20THE%20WAKE%20OF%20DETERMINATION%5cdiscart.png/",
"folder": "image://D%3a%5cMusic%20Collection%5cSTORY%20OF%20THE%20YEAR%5c(2005)%20IN%20THE%20WAKE%20OF%20DETERMINATION%5cfolder.jpg/",
"thumb": "image://D%3a%5cMusic%20Collection%5cSTORY%20OF%20THE%20YEAR%5c(2005)%20IN%20THE%20WAKE%20OF%20DETERMINATION%5cfolder.jpg/"
},
"label": "In the Wake of Determination",
"playcount": 1,
"thumbnail": "image://D%3a%5cMusic%20Collection%5cSTORY%20OF%20THE%20YEAR%5c(2005)%20IN%20THE%20WAKE%20OF%20DETERMINATION%5cfolder.jpg/",
"title": "In the Wake of Determination",
"year": 2005