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 - Milhouse - 2014-01-28

I can only say that the request you're sending is filtering on media: video, so unless the directory contains video files you'll only get empty directories returned. Maybe the xbmc module always assumes media is video, is there a way to override the media type and change it to files?


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

(2014-01-28, 01:58)MilhouseVH Wrote: I can only say that the request you're sending is filtering on media: video, so unless the directory contains video files you'll only get empty directories returned. Maybe the xbmc module always assumes media is video, is there a way to override the media type and change it to files?

Video is fine, since i'm opening a playlist and searching for videos. The playlist is treated like a directory...


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

The answer was clear Smile

You can not access using the translated path you need to use original one Wink
The security check will fail otherwise.


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

(2014-01-28, 09:35)Tolriq Wrote: The answer was clear Smile

You can not access using the translated path you need to use original one Wink
The security check will fail otherwise.

Thanks for clearing that up, I didn't see anything about not using translated paths...


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

(2014-01-27, 23:27)Montellese Wrote: It only works with "special://profile/addon_data/some/path". Using the real path doesn't work and wouldn't be cross-platform safe anyway.

Wink And https://github.com/Montellese/xbmc/commit/cd3a21f53aa3f08db97fff5fb0d1666633b399ec code is simple to understand anyway Smile


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

Just found a little typo in types.json :

PVR.Details.Broadcast return field rating while it's parentalrating in servicedescription


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

Which one is correct? (I have no clue about PVR)


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

Well seems it's the types.json rating should be parentalrating since parentalrating works and not rating.


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

Yeah obviously because the code uses ServiceDescription.h. But which meaning is correct as one indicates a number-based rating and the other means a parental rating as in PG-13.


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

Well I don't have access to real data I work with the PVR.demo addon Sad

But the returned value is an int and I was surprised to see a parentalrating as an int Sad

I guess we need to ask to a PVR expert Sad


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

According to the code CEpgInfoTag provides both a rating and a parentalrating property but only the "rating" property (which is an actual numbered/stared rating) is made accessible to JSON-RPC.
Oddly enough both rating and parentalrating are integers so not sure what real-life values for "parentalrating" would be. But it looks like both could be made available to JSON-RPC to fix this.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Regss - 2014-02-02

Code:
{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovieDetails", "params": {"properties": ["cast", "title", "plot", "rating", "year", "thumbnail", "fanart", "runtime", "genre", "director", "originaltitle", "country", "trailer", "playcount", "lastplayed", "dateadded", "streamdetails"], "movieid": 10}, "id": "1"}
Cast does not always return the actor thumbnail, although a valid link exists in the database actors table.
Tested on 12.2 and 13.0-ALPHA11 Git:20131231-8eb49b3

Ok, I noticed that if the thumb link in the "actors" table exist but in table "art" does not, JSON does not receive it. How can I fix this?


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

JSON-RPC can only access the artwork that has already been cached by XBMC because otherwise there's no image:// URL available (which is what XBMC uses to access artwork) and the URL provided would not work for downloading the artwork.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Milhouse - 2014-02-02

(2014-02-02, 22:44)Montellese Wrote: JSON-RPC can only access the artwork that has already been cached by XBMC because otherwise there's no image:// URL available (which is what XBMC uses to access artwork) and the URL provided would not work for downloading the artwork.

This trac ticket may be related. It's marked as fixed, but maybe it's not... I haven't really be able to test it myself.


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

(2014-01-31, 14:21)Tolriq Wrote: Just found a little typo in types.json :

PVR.Details.Broadcast return field rating while it's parentalrating in servicedescription

This has been fixed in master. Now both "rating" and "parentalrating" are available.

Thanks again for the report.