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

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



- Montellese - 2011-09-20 15:40

sling100 Wrote:Is there a post somewhere listing the general changes to the methods for accessing these?

I'm not sure I understand. Most methods were either just renamed or moved to another namespace. Some methods were merged and only few methods were changed dramatically like Player.Open or Player.Seek.

In general calling JSONRPC.Introspect will (as usual) provide you with detailed information on which methods are available and what parameters they take.

If you have any specific questions to certain methods I'm happy to help out.


- sling100 - 2011-09-20 15:50

Sorry - didn't realise that you had updated the introspect - suppose I should have looked first really ....

I'll have a look later and post anything I can't fathom.

Thanks

Simon


- Montellese - 2011-09-20 16:44

sling100 Wrote:Sorry - didn't realise that you had updated the introspect - suppose I should have looked first really ....

I'll have a look later and post anything I can't fathom.

Introspect is always updated because it is part of the whole implementation. It is the interface definition for developers using XBMC's jsonrpc API and we use it to automatically validate parameters in XBMC.


- Tolriq - 2011-09-20 20:49

Montellese Wrote:Tuesday, September 20th 2011:
Commits: 5abc022c3a353e206f78
  • Added "name" and "version" to Application.GetProperties

This takes care of System.BuildVersion from GetInfoLabels AND it allows to differ between applications (like Boxee using our jsonrpc API).

Thanks for that Smile

Was hard to handle build with pre and other to load correct plugin to support all Xbmc versions Smile

I forgot one thing that i have remove from my code since it was not working correctly it was GetSystemInfo with param 667 to get the underlying OS but was getting lots of Busy instead of correct value.

This information can be used to display os icons Smile but also to detect changes on xbmc client. Since Yatse permit connexions to multiple Xbmc machine and have local database cache with thumb cache too, i used this to have one more check on if the user connects to the correct xmbc corresponding to the local database and not lost data and do a 1 or 2 GB of thumbs sync.


- Montellese - 2011-09-20 20:57

And some more action. Pay special notice to the last change as it will probably affect every client/app using jsonrpc:

Tuesday, September 20th 2011:
Commits: a03c34b37ae64637a9fd, 2a848458dbfd36d87058, 481a6007e899bdba21f2
  • Fixed value of "file" field for videos
  • Renamed "label" field for albums to "albumlabel" for consistency with the name of the returned property
  • Renamed "fields" parameters to "properties" parameters



- lewisc - 2011-09-21 10:13

Has anyone tried creating a .net (C#) XBMC remote app in Windows 8 with the new developer preview tools. I've tried creating an app with both dstruktiv's and Montellese's XBMC JSON .Net libraries and it will not connect to XBMC. Not only that it breaks the XAML designer after you reference the dll's (either XbmcJson.dll or XBMCJsonRpcSharp.dll). I've tried this connecting to Dharma and the latest nightly builds also.

Any ideas where I can start with this?


- Montellese - 2011-09-21 10:32

My library is far from up-to-date with the latest nightly builds. It should work with Dharma though but obviously I didn't test it on Win8.


- lewisc - 2011-09-21 10:35

It must be something to do with the way Windows 8 Metro style apps work differently to traditional Windows apps then as I couldn't get it to work with Dharma (although I could with a quick C#.net console application). I will keep investigating the problems with Windows 8.


- sling100 - 2011-09-21 16:38

OK, so I've got my head around the new player/playlist methods and they work really well. The one thing I can't figure is how to obtain the playlist position of the currently playing item. Is this something I can add to the Player.OnPlay notification? It returns the current song ID, but not position.

Thanks

Simon


- Montellese - 2011-09-21 16:51

sling100 Wrote:OK, so I've got my head around the new player/playlist methods and they work really well. The one thing I can't figure is how to obtain the playlist position of the currently playing item. Is this something I can add to the Player.OnPlay notification? It returns the current song ID, but not position.

Thanks

Simon

Well you can retrieve the current position using the "position" property in Player.GetProperties. That being said it might make sense to add that to the OnPlay notification. I'll think about it.