Working JSON RPC API Examples - 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: Working JSON RPC API Examples (/showthread.php?tid=157996) |
RE: Working JSON RPC API Examples - petou - 2017-08-29 Hello, is anyone able to open a youtube video with JSON. I passed several hours trying to get an example to work on my kodi (17.4) with no luck. I would like to open it via plugin.video.youtube. If that could work i will try to do the same with my spotify addon! thanks RE: Working JSON RPC API Examples - Razze - 2017-08-29 (2017-08-29, 16:28)petou Wrote: Hello, Well you can do this via the urls: https://github.com/Razzeee/plugin.video.rocketbeans/blob/master/resources/lib/plugin.py Not sure if it's also possible via json rpc RE: Working JSON RPC API Examples - MKANET - 2017-09-09 Is there a command for to play next/previous media (Next/Previous during media playback)? I could only find the play/pause command. RE: Working JSON RPC API Examples - petou - 2017-09-09 @MKANET Code: {"jsonrpc":"2.0","method":"Player.GoTo","params":{"playerid":1,"to":"next"},"id":1} I found the answer for my previous post. To play specific youtube video via youtube plugin: Code: {"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"file":"plugin://plugin.video.youtube/play/?video_id=wQP9XZc2Y_c"}},"id":"1"} videoid is in the video youtube address see : This link RE: Working JSON RPC API Examples - MKANET - 2017-09-10 Thanks petou. It looks like the method Player.GoTo is isn't recognized; at least, on my installation of Kodi 17 on Windows. Below, is the code that worked for me: Code: { "jsonrpc": "2.0", "method": "Input.ExecuteAction", "params": { "action": "skipnext" }, "id": 1 } (2017-09-09, 13:06)petou Wrote: @MKANET RE: Working JSON RPC API Examples - petou - 2017-09-10 Weird, it's the code i used for my kodi 17.4 on ubuntu... I'll try yours tomorrow. Glad you found it! edit: Just tried your method and it work as well. RE: Working JSON RPC API Examples - agb2 - 2018-03-26 (2016-04-29, 19:21)atailo Wrote: friends, I am not managing to filter movies based on cast, property name. I can filter based on year but would like to filter based on the artist because the artist created filter and would like to use the name of each artist to find the films he participates.This was posted on this thread a couple of years ago, but I haven't seen any replies to it. I'm also trying to filter on cast contents, without any luck. Has anyone got a working example of such a filter? Thanks in advance :-} RE: Working JSON RPC API Examples - ncarthy - 2018-03-29 (2018-03-26, 17:11)agb2 Wrote:The correct field is "actor", not "cast". Try this:(2016-04-29, 19:21)atailo Wrote: friends, I am not managing to filter movies based on cast, property name. I can filter based on year but would like to filter based on the artist because the artist created filter and would like to use the name of each artist to find the films he participates.This was posted on this thread a couple of years ago, but I haven't seen any replies to it.
You can see the valid filters in the wiki (https://kodi.wiki/view/JSON-RPC_API/v8#VideoLibrary.GetMovies), just expand the JSON Schema Description and scroll down. According to that website the other valid filters are genreid, genre, year, director, studio, setid, tag and country. I've not tested those other filters though. RE: Working JSON RPC API Examples - agb2 - 2018-04-04 (2018-03-29, 21:37)ncarthy Wrote:Thanks for the reply. I had managed to work this out after posting.(2018-03-26, 17:11)agb2 Wrote:The correct field is "actor", not "cast". Try this:(2016-04-29, 19:21)atailo Wrote: friends, I am not managing to filter movies based on cast, property name. I can filter based on year but would like to filter based on the artist because the artist created filter and would like to use the name of each artist to find the films he participates.This was posted on this thread a couple of years ago, but I haven't seen any replies to it. I am now attempting to filter on ActorA *and* ActorB. Do you by any chance have a working example of this? Cheers :-} RE: Working JSON RPC API Examples - MKANET - 2018-07-03 I'm hoping someone would be kind enough help get me with this. I've tried throwing everything and the kitchen sink at this with not much luck. I would like to execute playback of a Spotify Music addon playlist. I am able to pull up the Music addon's root menu\directory items via curl... However, I'm not sure what to do next. Here's the command:
Here's the result: {"id":"1","jsonrpc":"2.0","result":{"files":[{"file":"plugin://plugin.audio.spotify/?action=browse_main_library","filetype":"directory","label":"My Music","type":"unknown"},{"file":"plugin://plugin.audio.spotify/?action=browse_main_explore","filetype":"directory","label":"Explore","type":"unknown"},{"file":"plugin://plugin.audio.spotify/?action=search","filetype":"directory","label":"Search","type":"unknown"},{"file":"plugin://plugin.audio.spotify/?action=browse_playback_devices","filetype":"directory","label":"Playback device: Local playback on this device","type":"unknown"},{"file":"plugin://plugin.audio.spotify/?action=switch_user","filetype":"file","label":"Current user: mkanet","type":"unknown"}],"limits":{"end":5,"start":0,"total":5}}} So, how can I playback the Spotify playlist... "My Music\Night Rider" via command line? Currently, I can only see the "My Music" menu item from my previous query above. Edit: As desperate as I am, I've been just throwing anything I can think of at the command line (hoping maybe I'll accidentally get lucky). I've looked at the Spotify Addon via the Kodi Web Interface.. This is the best I could come up with; which, of course returns no results.
Edit #2: While waiting for someone two help out, I also tried to do this with the Google Music addon. Same result... no errors no result: Any help would be greatly appreciated! MKANET RE: Working JSON RPC API Examples - Spiderfish - 2018-09-17 can I add string in this method json-rpc: headers = { 'Content-Type': 'application/json', } data = '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.windowsid"},"id":1}' response = requests.post('http://192.168.15.20:8080/jsonrpc', headers=headers, data=data, auth=('user', '1234')) I am thinking to add string to travel with Addons.ExecuteAddon method. How about this : { "id": "Array.String", "type": "array", "items": { "minLength": 1, "type": "string" } } How can I do this scenario? Thanks for all RE: Working JSON RPC API Examples - iophobia - 2018-09-23 Don't know where to put this but hope somebody can help. As of Kodi 17 I used to invoke Alexa --> IFTTT --> Kodi JSON-RPC to change PVR channels in Kodi via HTTP GET and "http://URL/jsonrpc?request={ "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "channelid": 5} }, "id": 3 }" which worked liked a charme. I understand that the API changes in v18 don't allow for "GET" but I simply have no idea how a working example for the v18 API would look like for my case. Thanks in advance. RE: Working JSON RPC API Examples - MKANET - 2018-09-23 (2018-09-23, 19:48)iophobia Wrote: Don't know where to put this but hope somebody can help.I also use something very similar... Cortana ---> IFTTT ---> Kodi JSON-RPC. I'm still using Kodi 17. I would like to know too before upgrading to Kodi 18. RE: Working JSON RPC API Examples - jorgecardoso - 2018-10-22 hello everyone, I am trying to use the app Anymote to control my Kodi and my tv. The app supports network commands but I can't make it work. anyone had any luck with this? I have working HTTP POST command that I simply paste into web browser and kodi either start playing or pausing current media. How do I transfer this line of code into AnyMote Network Command that look like in this Thanks in advance RE: Working JSON RPC API Examples - black_eagle - 2018-10-22 (2018-09-23, 19:48)iophobia Wrote: Don't know where to put this but hope somebody can help.Get is supported in V18 according to the protocol table here. |