• 1
  • 133
  • 134
  • 135(current)
  • 136
  • 137
  • 226
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
I would say :

Code:
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Export", "param" : {"images": "true"}, "id": "mybash"}' -H 'content-type: application/json;' http://htpc:8080/jsonrpc
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
(2012-06-08, 04:04)rickles Wrote: Hi, I have spent way too much time trying to figure this out so I hope someone can help me. I am using curl to remotely export my video library from the terminal:

Code:
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Export", "id": "mybash"}' -H 'content-type: application/json;' http://htpc:8080/jsonrpc

I want to include the "images": "true" option so that my fanart and thumbnails are exported too. Can someone show me how to add it to the above command? Thanks very much.

Code:
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Export", "pararms": { "options": { "images": true } }, "id": "mybash"}' -H 'content-type: application/json;' http://htpc:8080/jsonrpc
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
I thought I'd test out the new filtering which looks like it's gone in now. Using VideoLibrary.GetMovies with any kind of sorting doesn't work. Everything is always in movieid order with or without using limits.
Image
AWXi - Ajax web interface. Wiki
Reply
Holy crap I actually didn't wanna push the JSON-RPC stuff yet because it's not done. That's what you get for trying to get something in during the current merge window.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
I did wonder why it was only on the video library. The speed looks good with limiting anyway Smile
Image
AWXi - Ajax web interface. Wiki
Reply
I reverted the json-rpc related commit for now and will add it properly ASAP. Sorry about that.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
I may be missing something blindingly obvious but are websockets not working with Firefox? I'm using 13 and the XBMC log says "WebSocket [RFC6455]: invalid "connection" received". The http://www.websocket.org/echo.html works though. Chrome is fine. Is anyone working with websockets and Firefox?
Image
AWXi - Ajax web interface. Wiki
Reply
Because Firefox seems to send "Connection: keep-alive, Upgrade" instead of the expected "Connection: Upgrade" in the websocket handshake. Will have to check with RFC6455 if that's "legal" or not.

EDIT: OK RFC6455 states that the "Connection" header must CONTAIN "Upgrade" so I've fixed that. Now establishing a connection and sending JSON-RPC requests works but disconnecting throws an error. Once I've figured that out I'll push the fixes. Thanks for the report.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
OK I've pushed the fix for establishing a websocket connection with Firefox. But I couldn't really figure out why it fails on the disconnect. It seems like it doesn't expect a Close frame as a response to it's own Close frame but the RFC states
Quote:If an endpoint receives a Close frame and did not previously send a Close frame, the endpoint MUST send a Close frame in response.
so XBMC has to send that Close frame. If I don't send that Close frame and just close the TCP connection, the error disappears. While that also works fine in Chrome and also seems to be what the websocket server implementation of www.websocket.org does (looking at the sent packets in Wireshark there's no response from websocket.org after the Close frame) it is not what the RFC states.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
It does seem that Mozilla and Google are becoming "Old" Microsoft like as Microsoft become more compliant. Anyway, thanks for the quick fix.
Image
AWXi - Ajax web interface. Wiki
Reply
Internally generated thumbnails don't appear to be sent. To be clear: TheTVDB doesn't have an image for an episode so XBMC takes a random screen shot. The "thumbnail" property for that episode is empty. Bug ticket?
Image
AWXi - Ajax web interface. Wiki
Reply
Yes please and CC me and jmarshall.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
Is Firefox working with websockets for you now? I refresh and it worked once (didn't pay any attention as it was working). Since then I've not been able to get it to work again the log has:
Code:
00:06:47 T:2796526448   DEBUG: JSONRPC Server: New connection detected
00:06:47 T:2796526448    INFO: JSONRPC Server: New connection added
Which would suggest it's working. From what I can tell from Wireshark it's not "switching protocol". Is this just me?
Image
AWXi - Ajax web interface. Wiki
Reply
Works perfectly fine for me with Firefox 13 on win32. That part of the debug log states the same. What does not work after you connected? Is this with your own implementation or with the echo test from websocket.org?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
It's very weird. I fired up my old laptop to test and it works fine on there. My desktop just won't connect. It times out and FF says it can't connect. The echo test site works without a problem. I guess it's just limited to my desktop.
Image
AWXi - Ajax web interface. Wiki
Reply
  • 1
  • 133
  • 134
  • 135(current)
  • 136
  • 137
  • 226

Logout Mark Read Team Forum Stats Members Help
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC8