Talk:JSON-RPC API: Difference between revisions
Jump to navigation
Jump to search
>Divol No edit summary |
>Divol (→patch to be done CAudioLibrary::GetAlbums: new section) |
||
Line 12: | Line 12: | ||
--[[User:Divol|Divol]] 17:14, 24 February 2011 (UTC) | --[[User:Divol|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 ¶meterObject, Value &result) | |||
{ | |||
if (!(parameterObject.isObject() || parameterObject.isNull())) | |||
return InvalidParams; | |||
const Value param = ForceObject(parameterObject); | |||
<pre> | |||
if (!(ParameterIntOrNull(param, "artistid") || ParameterIntOrNull(param, "genreid"))) //jd: | |||
</pre> | |||
to be replaced by | |||
<pre> | |||
if (!(ParameterIntOrNull(param, "artistid") || ParameterIntOrNull(param, "albumid"))); | |||
</pre> |
Revision as of 08:48, 3 March 2011
-- Hints --
- First : have a look to json RPC 2.0, it's not a joke, you'll win much time ! ( the "id", the "id" ...!)
- the generic http url is : http://user:pass@xbmcIP:xbmcPort/jsonrpc
- 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 ¶meterObject, Value &result) { if (!(parameterObject.isObject() || parameterObject.isNull())) return InvalidParams;
const Value param = ForceObject(parameterObject);
if (!(ParameterIntOrNull(param, "artistid") || ParameterIntOrNull(param, "genreid"))) //jd:
to be replaced by
if (!(ParameterIntOrNull(param, "artistid") || ParameterIntOrNull(param, "albumid")));