Talk:JSON-RPC API

From Official Kodi Wiki
Jump to navigation Jump to search

-- Hints --

  • First : have a look to json RPC 2.0, it's not a joke, you'll win much time ! ( the "id", the "id" ...!)
    • yes, the /jsonrpc is mandatory (see xbmc code source ....)
  • the POST message could be :

{"jsonrpc":"2.0","method":"JSONRPC.Introspect","id":"introspect"}

--Divol 17:14, 24 February 2011 (UTC)

patch to be done CAudioLibrary::GetAlbums

ok, i know there's a place to note bugs. I am using this page as scrapbook...


JSON_STATUS CAudioLibrary::GetAlbums(const CStdString &method, ITransportLayer *transport, IClient *client, const Value &parameterObject, Value &result) { if (!(parameterObject.isObject() || parameterObject.isNull())) return InvalidParams;

const Value param = ForceObject(parameterObject);


 if (!(ParameterIntOrNull(param, "artistid") || ParameterIntOrNull(param, "albumid")));

to be replaced by

 

if (!(ParameterIntOrNull(param, "artistid") || ParameterIntOrNull(param, "genreid"))) //jd: