Posts: 3,077
Joined: Jun 2009
No you don't have to change anything, you urlencode the thumbnail value then use http://x.x.x.x:y/image/urlencoded to get the good thumb.
Or the better official way you use File.PrepareDownload but not really needed for thumbs.
Posts: 254
Joined: May 2011
Reputation:
2
yallah
Senior Member
Posts: 254
Ok I use this command to send Json:
{"jsonrpc": "2.0", "method": "audiolibrary.GetAlbums", "params": { "filter": { "artistid": 2 } , "properties": ["thumbnail", "title", "fanart", "artist"] }, "id": 1}
and I received :
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"albums": [
{
"albumid": 6,
"artist": [
"Artistes divers"
],
"fanart": "image://",
"label": "Trouble [CD2]",
"thumbnail": "image://music@Z%3a%5cAkon%20-%20Discography%205%20Albums%5cAkon%20-%20Trouble%20%5b2004%5d%5cCD2%5c01%20%20Akon%20-%20Belly%20Dancer%20%5bBananza%5d%20%5bFeat.%20Kardinal%20Offishall%5d%20%5bRemix%5d.mp3",
"title": "Trouble [CD2]"
},
{
"albumid": 15,
"artist": [
"Artistes divers"
],
"fanart": "image://",
"label": "\"Final Fantasy X-2\" Piano Collections",
"thumbnail": "",
"title": "\"Final Fantasy X-2\" Piano Collections"
}
],
"limits": {
"end": 2,
"start": 0,
"total": 2
}
}
}
Mys server have IP 192.168.2.29 and use default port 8080.
Can you send me command http://x.x.x.x:y/image/urlencoded if i want see thumbnail in my browser for album Trouble [CD2].
Posts: 3,077
Joined: Jun 2009
come on ... I give you all needed information
I don't know what language you use but you need to do in pseudo code
var url = urlencode("image://music@Z%3a%5cAkon%20-%20Discography%205%20Albums%5cAkon%20-%20Trouble%20%5b2004%5d%5cCD2%5c01%20%20Akon%20-%20Belly%20Dancer%20%5bBananza%5d%20%5bFeat.%20Kardinal%20Offishall%5d%20%5bRemix%5d.mp3")
httpget "http://192.168.2.29:8080/image/" + url
Not really complicated
Posts: 3,077
Joined: Jun 2009
@
terrylau : 1) should work check the content of the playlist and / or xbmc debug log.
2) this is normal all the playlist namespace only works with current playlist.
For your needs use the File.GetDirectory on the playlist and you will have the content
@yallah: I think I remember a bug at a moment with images from mp3 tags and not folder images, check this thread and be sure to use last builds, if still present perhaps it's still not corrected so it may worth to open a trac ticket.
@
Bram77 : from code this seems normal the limits param is not used
only recentsongs have an applied albumlimit.
This may worth a change in behavior or a change in introspect.
Posts: 3,077
Joined: Jun 2009
Quote:"streamdetails" is not an array. It's an object which can have a "video", "audio" and "subtitle" property.
So maybe send back an object with empty arrays after :p the thing is that null object in direct json stream parsing is a pain to handle in normal cases
BTW last Frodo builds have great JSON improvements and speed in limits in query is cool too