Kodi Community Forum

Full Version: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2012-10-06, 13:21)Montellese Wrote: [ -> ](I don't wanna watch TV at all ever).
+1 ;-)


Hi guys,

I'm the dev. of the "outdated PR" for LiveTV support in JSON. I haven't looked at them in a long time Sad Originally I wrote them to be able to use PVR in the XBMC Remote client for MeeGo for which I did some dev. work. But as I haven't done any dev. work on that remote client lately I also didn't invest time to update the PR. A couple of days back I tried to get some of the changes updated, but without success Sad. I'll see if I can redo all the work on top of current master (as there has been a lot of changes lately in the Player things, and the current PR isn't based on master but on Lars' "JSON PVR" PR). But I guess I don't have enough experience with XBMCs code to get all the changes properly done (in time).

Montellese, maybe we can join the efforts to get it in on time. As you're far more experienced with XBMCs code to get things properly integrated (the Start and Stop announcements which Lars only wants to be send when playback actually starts, for example). I've also already written some code a while back to get channel listings and the like, but these are incomplete. What do you think would be the best way to get our efforts joined? Discussing them in #xbmc-pvr (I have the same nick there)?
I've started to look into your changes and will apply them to master. I'll push them once I got it compiling and will let you know.
Okay, great Smile If you'll need someone to test it (before pushing) I might be able to do so. Or send me a PM and I might be able to give you access to my TVHeadend server.

I will check the state of the "read" operations I added to the PVR namespace (PVR.GetChannels and the like) and see if I can create a PR for them.
The most important integration is probably to be able to use the Player methods also with PVR channels/streams. Anything else is nice to have IMO at this point in time (i.e. 4 days before feature freeze).
(2011-09-28, 17:40)Montellese Wrote: [ -> ]
jasonvp Wrote:Can you please give me an example for "Player.Seek" params (percentage)? It's driving me nuts. Huh

Player.Seek is the best example/usage of the newly supported "union type definition". Player.Seek takes two parameters. The "playerid" (as all the other Player methods do) and a "value" parameter. The "value" parameter can have the following values:
  • a number value between 0.0 and 100.0 in which case it is handled as a percentage value to which the player should seek to. So if you pass 50.0 as the value the player will seek to the middle of the file being played.
  • a string value which takes one of the following values: "smallforward", "smallbackward", "bigforward", "bigbackward". These values replace the old FooPlayer.Small/BigSkipForward/Backward methods that aren't available anymore.
  • an object containg at least one of the following properties: "hours", "minutes", "seconds", "milliseconds". This allows to define a specific time value to which the player will seek to.

Hope this helps.

Hi

When you have some time Montellese can you check this bug because doesn't work for me (with XBMC frodo Alpha7(4/10/12))

Work with video:
{"jsonrpc": "2.0", "method": "Player.Seek","params": {"playerid":1,"value":"smallforward"}, "id": 1}

Don't work for me in audio:
{"jsonrpc": "2.0", "method": "Player.Seek","params": {"playerid":0,"value":"smallforward"}, "id": 1}
Hi there,

I'm facing a little problem, I'd like to add playlist queue support for file mode, but as of today we need to know what kind of media we are dealing with to add it to the correct playlist.
I suppose I can check the file extension to guess that but maintaining such a list to stay at the same level as Xbmc is not an easy task.

The problem is the same and bigger for directories. If I remember correctly for the moment Xbmc does not support adding directory to playlist ?

So the question is do you have an idea of how to allow such things to be handled ?
Has a mixed dir (why would you do that out of interest?) ever worked? I may not be understanding you correctly but I just tried adding a folder to the playlist and it worked just fine. Admittedly, it was only an album folder but was not in my sources. You can add directories it just won't recurse them.

The problem was more that a directory can contain lots of things Smile

But I suppose there's no easy way to handle playlist and arbitrary List.Item.File .
(2012-10-07, 15:37)Tolriq Wrote: [ -> ]The problem was more that a directory can contain lots of things Smile

But I suppose there's no easy way to handle playlist and arbitrary List.Item.File .

Don't support file mode Smile
Well I start to have quite some users of Yatse, and I'm really surprised by the number of users that use File mode over Library.

I agree it's rather weird as the library is what I consider the main purpose of XBMC. I'm not sure if I still follow but here is what AWXi currently does. I have "Files" under music and video. With the GetFiles I specify "media" of either "music" or "video" ofc Smile Then I know that all the files listed can be passed to the playlist. If people can't even separate music and video files, tough titty imo. But I'm sure I don't need to teach you how to suck eggs. Wink
(2012-10-06, 21:32)yallah Wrote: [ -> ]Hi

When you have some time Montellese can you check this bug because doesn't work for me (with XBMC frodo Alpha7(4/10/12))

Work with video:
{"jsonrpc": "2.0", "method": "Player.Seek","params": {"playerid":1,"value":"smallforward"}, "id": 1}

Don't work for me in audio:
{"jsonrpc": "2.0", "method": "Player.Seek","params": {"playerid":0,"value":"smallforward"}, "id": 1}
It's not a JSON-RPC bug and I'm not sure if it is considered a bug. Since the merge of AE (which contained a complete rewrite of the music player) it is not possible anymore to seek within a playing song.

(2012-10-07, 11:20)Tolriq Wrote: [ -> ]Hi there,

I'm facing a little problem, I'd like to add playlist queue support for file mode, but as of today we need to know what kind of media we are dealing with to add it to the correct playlist.
I suppose I can check the file extension to guess that but maintaining such a list to stay at the same level as Xbmc is not an easy task.

The problem is the same and bigger for directories. If I remember correctly for the moment Xbmc does not support adding directory to playlist ?

So the question is do you have an idea of how to allow such things to be handled ?
I don't think I understand your problem/question. Can you re-phrase it please?
Well all is related to the limitation of current Playlist system Smile

It's more or less the same problem about playlist.getitems that returns list.item.file that is then no more an known Xbmc database item.

When using File.GetDirectory there's no way to know the returned file kind (video or music or picture) if not in database. So to then add them to playlist we need to guess if video or audio on client side.

Perhaps getting a new field to know the kind of media would help.
you can pass the media property in Files.GetDirectory so it only returns a certain media type..