• 1
  • 164
  • 165
  • 166(current)
  • 167
  • 168
  • 226
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
I'm having a bit of brain failure... can anyone see what i'm doing wrong here?

Frodo nightly build from about 3 days ago.

Code:
{"jsonrpc": "2.0", "method": "AudioLibrary.GetArtistDetails", "params": {"artistid": 3,"properties": ["fanart", "description"]}, "id": "AudioLibrary.GetArtistDetails"}

Returns:
Code:
{"error":{"code":-32602,"message":"Invalid params."},"id":"AudioLibrary.GetArtistDetails","jsonrpc":"2.0"}

Thanks,
Matt.
Reply
It means that there's no artist with an ID 3.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
(2012-11-19, 01:22)VeeV Wrote: Ok, I think the same is happening with channel, channeltype, hidden, locked, endtime, channelnumber, tag, starttime. Might be worth double checking it.

Fixed in https://github.com/xbmc/xbmc/commit/d938...0a95a63d93.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
(2012-11-19, 09:49)Montellese Wrote:
(2012-11-19, 01:22)VeeV Wrote: Ok, I think the same is happening with channel, channeltype, hidden, locked, endtime, channelnumber, tag, starttime. Might be worth double checking it.

Fixed in https://github.com/xbmc/xbmc/commit/d938...0a95a63d93.

We are missing "dateadded" too I think.
Reply
(2012-11-19, 08:46)doozer Wrote: I'm having a bit of brain failure... can anyone see what i'm doing wrong here?

Frodo nightly build from about 3 days ago.

Code:
{"jsonrpc": "2.0", "method": "AudioLibrary.GetArtistDetails", "params": {"artistid": 3,"properties": ["fanart", "description"]}, "id": "AudioLibrary.GetArtistDetails"}

Returns:
Code:
{"error":{"code":-32602,"message":"Invalid params."},"id":"AudioLibrary.GetArtistDetails","jsonrpc":"2.0"}

Thanks,
Matt.

Hi Montellese,

Ok, so if artist 3 doesn't exist, I need to take a step back and show how i got the id:
Code:
{"jsonrpc": "2.0", "method": "Player.GetItem", "params": {"playerid": 0, "properties": ["title","artist","artistid","year","rating","albumartist","track","duration","genre","album","thumbnail","fanart"]}, "id": "Player.GetItem"}

As you can see, I'm requesting the artistid as one of the params.

The response i get is:
Code:
{"id":"Player.GetItem","jsonrpc":"2.0","result":{"item":{"album":"Greatest Hits","albumartist":[],"artist":["Eurythmics"],"duration":227,"fanart":"","genre":["Misc"],"id":3,"label":"Who's That Girl?","rating":0,"thumbnail":"image://DefaultAlbumCover.png/","title":"Who's That Girl?","track":3,"type":"song","year":1991}}}

If the "id":3 isn't the artistid, what is it, and how should I go about getting the currently playing artistid?

Thanks,
Matt.

Reply
In that example 3 is the song id. See "type". To get the fanart and description you could use AudioLibrary.GetArtists and filter by artist
Image
Reply
(2012-11-20, 07:09)N3MIS15 Wrote: In that example 3 is the song id. See "type". To get the fanart and description you could use AudioLibrary.GetArtists and filter by artist

Ok, but why is the artistid ignored in the request?
Reply
(2012-11-20, 07:52)doozer Wrote:
(2012-11-20, 07:09)N3MIS15 Wrote: In that example 3 is the song id. See "type". To get the fanart and description you could use AudioLibrary.GetArtists and filter by artist

Ok, but why is the artistid ignored in the request?

Long story, but in essence because its possible to have more than 1 artist per song/album artistid is no longer returned.
Image
Reply
(2012-11-20, 08:14)N3MIS15 Wrote:
(2012-11-20, 07:52)doozer Wrote:
(2012-11-20, 07:09)N3MIS15 Wrote: In that example 3 is the song id. See "type". To get the fanart and description you could use AudioLibrary.GetArtists and filter by artist

Ok, but why is the artistid ignored in the request?

Long story, but in essence because its possible to have more than 1 artist per song/album artistid is no longer returned.

We are discussing this and it may return.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
Hi !

I switch to frodo yesterday and I try this command
{"jsonrpc": "2.0", "method": "audiolibrary.GetAlbums", "params": {"artistid": 3,"properties": ["thumbnail", "title", "fanart", "artist"] }, "id": 1}

and I receiceve code = -32602
data: {
..message = Too many parameters
..method = AudioLibrary.GetAlbums
..stack: {
....name = Item.Fields.Base
....property: {
......type = string
....}
....type = array
..}
}
message = Invalid params.

Thanks
Reply
Yeah all those filtering parameters like "artistid" and "genreid" have been moved into a "filter" parameter so you need to do
Code:
{"jsonrpc": "2.0", "method": "audiolibrary.GetAlbums", "params": {"properties": ["thumbnail", "title", "fanart", "artist"], "filter": { "artistid": 3 } }, "id": 1}
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
Thanks for your help
Reply
Got a report today of a problem using JSON Files.GetDirectory with sources that targets upnp.

I quote here :
(2012-11-20, 20:15)ears Wrote: OK This is repeatable so I did it again with debug logging enabled.

Same behaviour - start up XBMC, go to UPnP server using keyboard, everything works fine. Can browse, opened up a stream, listened, stopped it.

At the turn of 18:07 I started using the Yatse tool. Immediately I could no longer browse the UPnP server.

Although interestingly I can browse any folder that I had previously accessed with the keyboard.

Then return to using the keyboard, and I can no longer browse any (non-cached?) UPnP folders, although I can still browse the one that I accessed at the start.

Paste Bin link to the log file - http://pastebin.com/kvrxnyTu

Thanks.

(2012-11-20, 22:06)ears Wrote: Yes.

Add the source (or use an existing one) after starting XBMC, using keyboard direct at XBMC, everything works fine.

Access the same source using Yatse, and I can't access any new folders that I didn't access already on the keyboard.

Go back to using the keyboard and it's still not working.

Close XBMC, start again and everything resets - works fine using keyboard until I access it using Yatse, then it breaks again.

Seems like Files.GetDirectory does not init something on Xbmc side.
Reply
Any idea about this ? Should I open a trac ticket but on witch category ?
Reply
I'm trying to get my hands on alcoheca which has refactored the whole upnp code. Files.GetDirectory() simply calls CDirectory::GetDirectory() in XBMC which will pick whatever filesystem implementation is needed (in this case CPUPnPDirectory) and calls its GetDirectory() implementation.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
  • 1
  • 164
  • 165
  • 166(current)
  • 167
  • 168
  • 226

Logout Mark Read Team Forum Stats Members Help
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC8