Kodi Community Forum
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174)
+---- Thread: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC (/showthread.php?tid=68263)



RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-05-19

(2014-05-19, 21:30)Lunatixz Wrote: did GetDirectory change recently?

I'm unable to return xbmc library info from json...

Code:
{"jsonrpc":"2.0","method":"Files.GetDirectory","params":{"directory":"smb://0.0.0.0/TV Shows/White Collar/Season 3/","properties":["duration","runtime"]},"id":19}

Should return duration, but doesn't... Worked in frodo and alpha builds of Gotham.

Tested with regular media (non strm) and strms, same result.

Database is mysql, btw... Thanks ahead of time...

You're missing the "media" parameter that allows Files.GetDirectory to know that it should look into the video database for the additional information.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Lunatixz - 2014-05-19

(2014-05-19, 22:03)Montellese Wrote:
(2014-05-19, 21:30)Lunatixz Wrote: did GetDirectory change recently?

I'm unable to return xbmc library info from json...

Code:
{"jsonrpc":"2.0","method":"Files.GetDirectory","params":{"directory":"smb://0.0.0.0/TV Shows/White Collar/Season 3/","properties":["duration","runtime"]},"id":19}

Should return duration, but doesn't... Worked in frodo and alpha builds of Gotham.

Tested with regular media (non strm) and strms, same result.

Database is mysql, btw... Thanks ahead of time...

You're missing the "media" parameter that allows Files.GetDirectory to know that it should look into the video database for the additional information.

The code was an example, I had media when testing, but no luck...

Code:
{"jsonrpc":"2.0","method":"Files.GetDirectory","params":{"directory":"smb://0.0.0.0/TV/Monk/Season 08/","media":"video","properties":["duration","runtime"]},"id":2}

Does it return info for you?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-05-19

You can't provide incomplete examples, I don't have a magic glass ball which will tell me what you changed and what you left out.

I just tried it with my Gotham install and
Code:
{ "jsonrpc": "2.0", "method": "Files.GetDirectory", "params": { "directory": "smb://NAS/video/tvshows/24/Season 1/", "media": "video", "properties": [ "runtime" ] }, "id": 1 }
works perfectly fine for me. But you only get a "runtime" because "duration" doesn't exist for videos.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Lunatixz - 2014-05-19

(2014-05-19, 22:15)Montellese Wrote: You can't provide incomplete examples, I don't have a magic glass ball which will tell me what you changed and what you left out.

I just tried it with my Gotham install and
Code:
{ "jsonrpc": "2.0", "method": "Files.GetDirectory", "params": { "directory": "smb://NAS/video/tvshows/24/Season 1/", "media": "video", "properties": [ "runtime" ] }, "id": 1 }
works perfectly fine for me. But you only get a "runtime" because "duration" doesn't exist for videos.

Yes you are 100% correct it was my bad... I was writing from memory since my code uses variables, I edit my queries so that it resembles a normal request... must have missed media...

Okay, if it works for you... it's on my end, I'll have to track it down.
Thanks

::Update::

Found the source of my problem, if you use user/pass for a smb share in the source path... it doesn't clear the whitelist so json request are blocked.
path:
smb://xbmc:[email protected] --- won't work
smb://0.0.0.0 --- works


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2014-06-03

Small detail but since it was reported by a few users I think it my worth reporting too Smile

Xbmc webserver settings have by default the login field filed. And some users does think that this activate the webserver security.
But if there's no password, it's not the case.

Perhaps login should be left empty, or a message should be added to explain that both login and password are mandatory to activate it.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Samtronic - 2014-06-09

Hi !

Is it posible to retrieve just the limits information on movie, tvshow, season, episode etc.... Not title, id etc....

Thanks
Steven


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-06-09

The closest I can think of is that you tried doing the call with no extra properties and providing a limit of 1. Then you get one item in the result but you still get the total number of available items.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Samtronic - 2014-06-09

Hi !

It's perfect with limit parameter. Thanks for the tip.

Steven


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-06-10

(2014-06-03, 13:22)Tolriq Wrote: Small detail but since it was reported by a few users I think it my worth reporting too Smile

Xbmc webserver settings have by default the login field filed. And some users does think that this activate the webserver security.
But if there's no password, it's not the case.

Perhaps login should be left empty, or a message should be added to explain that both login and password are mandatory to activate it.

Thanks for the report. I've extended the webserver username and password setting descriptions to contain the information that it is only active when both settings have a value.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - leechguy - 2014-06-10

Am I correct in thinking that currently it is not possible to get the following settings from profiles.xml using json:
Code:
<lastloaded>1</lastloaded>
<useloginscreen>false</useloginscreen>
<autologin>1</autologin>

Currently I am parsing the profiles.xml file from within my add-on, but it would prefer to use json if possible.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-06-10

(2014-06-10, 15:22)leechguy Wrote: Am I correct in thinking that currently it is not possible to get the following settings from profiles.xml using json:
Code:
<lastloaded>1</lastloaded>
<useloginscreen>false</useloginscreen>
<autologin>1</autologin>

Currently I am parsing the profiles.xml file from within my add-on, but it would prefer to use json if possible.

I don't know of any way to get these sorry.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - leechguy - 2014-06-10

ok, no worries. Thanks!


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - DerFlob - 2014-06-15

Hello,

is it possible to filter the results from the "AudioLibrary.GetSongs" method by musicbrainz information, like the musicbrainzalbumid? I was trying something like:
Code:
{"jsonrpc": "2.0", "method": "AudioLibrary.GetSongs", "params": {"filter": {"value": "c183522b-1d38-3e83-aaaf-fc3fc87cdc05", "field": "musicbrainzalbumid", "operator": "is"}, "properties": ["title"]}, "id": 1}

but it returns an error:
Code:
{"error":{"code":-32602,"data":{"method":"AudioLibrary.GetSongs","stack":{"message":"Received value does not match any of the union type definitions","name":"filter","property":{"type":"string"},"type":"object"}},"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}

Unfortunately, I couldn't find much about the filter field. Especially what those List.Filter.* are about and how they, if all, relate to the filter-field.

Any help and advice is much appreciated.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-06-15

The filtering doesn't support musicbrainz properties yet as this has been added to xbmc very recently and hasn't made it into the JSON-RPC API yet.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - rocking - 2014-06-18

Hi Guys,

First of all many many thanks for giving us like this amazing project freely.I am using RPi on XBMC and windows 8 laptop for server.i have downloaded the code of crestron in windows 8 laptop.i compiled perfectly.in RPi i have added my server(windows 8 laptop) by following this tutorial(http://wiki.xbmc.org/?title=UPnP).when i press movie's or videos or music or tv shows in crestron application it is responding but there it is not showing anything and in crestron app. home menu also it is not showing any thing(what ever the content in my server).please help me out any one.