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 - 2012-11-27

Marking a video as watched or unwatched is possible through the VideoLibrary.SetFooDetails methods by setting "playcount" either to 0 or > 0.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2012-11-27

Thanks again Montellese.
There is a way to simulate keyboard actions using JSON ?
Maybe will be better if i make a script to manage this, so, can i run a script with JSON ?
Thanks for all your help
Clayton


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-11-27

@Montellese : what is the field uniqueid in your last commit ?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-11-27

It's a generalization of "imdbid". It's a map which can have multiple key-value pairs specified scraper-specific identifications like "imdbid" or "tvdbid" etc. It was added a while ago for episodes (but will probably be expanded to other media types in the future).


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-11-27

Thanks, will have to look a little more how the data is returned object is kinda vague Smile


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-11-27

Yeah it's like a string-string-map i.e.
Code:
"uniqueid": {
    "tvdbepisodeid": "someid",
    "tvrageid": "someotherid"
}



RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-11-27

Ho cool Smile Powerful and easy,

I suppose as all others 1-n it does slow the query ?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-11-27

No it's stored as a JSON object in the database. Currently you will only get "unknown" as a key in "uniqueid" because scrapers don't support providing the key of the identifier yet.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - yallah - 2012-11-27

Hi,

Don't why bluray iso can't open via json-rpc (working if I execute ISO from GUI)...

{"jsonrpc": "2.0", "method": "Player.Open", "params": {"item": {"file":"Z:\\Star Wars Episode III - Revenge of the Sith (2005)\\Star Wars Episode III - Revenge of the Sith (2005).iso"}}, "id": 1}

http://pastebin.com/GBAtARU8

thx for your help


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2012-11-27

(2012-11-27, 13:25)Montellese Wrote: Marking a video as watched or unwatched is possible through the VideoLibrary.SetFooDetails methods by setting "playcount" either to 0 or > 0.
Thanks Montellese, i tried to find the VideoLibrary.SetFooDetails in Wiki, but don found. Maybe i am missing something.
Can you tell me where i can read about VideoLibrary.SetFooDetails ?
Thanks again
Clayton



RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-11-27

Foo is a standard dev acronym Wink

http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v5#VideoLibrary.SetMovieDetails for example Smile


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2012-11-27

Thanks Tolriq, i was loking in the V4, this will work for Eden and Frodo Alpha 3 too ?
Very thanks for all your help
Clayton


Re: RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Martijn - 2012-11-27

(2012-11-27, 23:16)claymic Wrote: Thanks Tolriq, i was loking in the V4, this will work for Eden and Frodo Alpha 3 too ?
Very thanks for all your help
Clayton

No.
Only on much later versions


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-11-28

(2012-11-27, 22:55)yallah Wrote: Hi,

Don't why bluray iso can't open via json-rpc (working if I execute ISO from GUI)...

{"jsonrpc": "2.0", "method": "Player.Open", "params": {"item": {"file":"Z:\\Star Wars Episode III - Revenge of the Sith (2005)\\Star Wars Episode III - Revenge of the Sith (2005).iso"}}, "id": 1}

http://pastebin.com/GBAtARU8

thx for your help
Not sure, might be that the GUI code performs some additional actions before playing an ISO. I don't have any so can't really test. I'll look into the code and see if there's an explanation.

(2012-11-27, 23:04)claymic Wrote: Thanks Montellese, i tried to find the VideoLibrary.SetFooDetails in Wiki, but don found. Maybe i am missing something.
Can you tell me where i can read about VideoLibrary.SetFooDetails ?
Thanks again
Clayton

You'll have to replace "Foo" with "Movie" or "Episode" or "MusicVideo" i.e. VideoLibrary.SetMovieDetails etc Wink I was just too lazy to type it all out.


Re: RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Martijn - 2012-11-28

(2012-11-27, 22:55)yallah Wrote: Hi,

Don't why bluray iso can't open via json-rpc (working if I execute ISO from GUI)...

{"jsonrpc": "2.0", "method": "Player.Open", "params": {"item": {"file":"Z:\\Star Wars Episode III - Revenge of the Sith (2005)\\Star Wars Episode III - Revenge of the Sith (2005).iso"}}, "id": 1}

http://pastebin.com/GBAtARU8

thx for your help

If this is a movie scraped to your library and you know the dbid you could also use Player.Open through JSONRPC