• 1
  • 22
  • 23
  • 24(current)
  • 25
  • 26
  • 226
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
Awesome. That alone would make it totally worth the effort of recoding my app to use JSON!
Reply
jitterjames Wrote:Will the JSON interface allow calling a script with an argument?

I could never get that to work with the http interface, and it would be really sweet!

I'm writing all php scripts with arguments. It's wrapped around a json rpc call to the api. So getsong.php?artist=Adele should provide you with a list of all her song's. Once I'm ready I'll publish my source code.
Reply
thanks, but I'm talking about calling python script that would run on xbmc. So for example if I wanted to create a custom OSD window in XBMC to show information sent from my program via JSON. (edit: or if I wanted to perform multi-command macros, it might be more efficient to make one call to a python script and have it execute the various steps, rather than sending multiple commands via JSON)

I'm sure that your code would still be helpful to look at for myself and others though.
Image
VoxCommando.com
Reply
jitterjames Wrote:thanks, but I'm talking about calling python script that would run on xbmc. So for example if I wanted to create a custom OSD window in XBMC to show information sent from my program via JSON.

I'm sure that your code would still be helpful to look at for myself and others though.

Also wanted to point out that jsonrpc supports announcements so python script can actually message (or well its a broadcast) to other jsonrpc clients to exchange data.

At some point, if there is interest, it will support directed messaging aswell (possibly encrypted).
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
Anyone know how to do this?

http://wiki.xbmc.org/index.php?title=JSO....GetVolume

This one isn't documented. I tried with this but no luck:

Code:
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "XBMC.SetVolume", "params": { "number": "90"}, "id": 1}' http://localhost:9019/jsonrpc
Reply
According to source, you should just use "params" : 90

But i was thinking a patch was made to avoid this kind of functionning since it was against JSON RPC specs.

It has perhaps not been finished.
Reply
The parameter itself should be the integer-value:
AWX:
Quote:'{"jsonrpc": "2.0", "method": "XBMC.SetVolume", "params": ' + ui.value + ', "id": 1}'

EDIT: oops, Tolriq was faster Smile
Here is the ticket: http://trac.xbmc.org/ticket/10095
:eek2: AWX - Ajax based Webinterface for XBMC (Dharma Beta 2)
Reply
erhnam Wrote:Anyone know how to do this?
I think like this:
Code:
curl -i -X POST -d '{"jsonrpc": "2.0", "method": "XBMC.SetVolume", "params": 90, "id": 1}' http://localhost:9019/jsonrpc

Edit: I was a bit late I see Sad

jonib
XBMC2, EventGhost plugin. Image
Reply
pfeifer Wrote:I am working very happy with JsonRpc.

I need to know the workaround for have only the album_artist and not all the artists included for e.g. in compilation where the album_artist is in my case "Various Artists".

How may I modify the following code?

Code:
{"jsonrpc": "2.0", "method": "AudioLibrary.GetArtists", "params": { "start": 0, "sort": { "order": "ascending", "method": "artist" } }, "id": 1}

Thanks
Sandro

No help me?
Reply
Can anyone tell me how to handle virtual playlists correctly?

Actually i only need an AudioPlaylist (and of course a VideoPlaylist) where i can add and remove songs and play a specific item. Everything works fine with the JSON-API except that there is no remove-method for AudioPlaylist and VideoPlaylist.
But there is a remove-method for virtual playlists. So i considered to use virtual playlists. But i don't know how to handle them correctly.
I know i can use Playlist.Create to create a v-playlist and Playlist.Add to add songs, albums and files. And then i can use XBMC.Play to play the v-playlist. But what about playlist changes? For example i remove some elements from the v-playlist. How do i pass the new v-playlist to the currently playing one without stopping the current song or restarting the playlist from the beginning?
:eek2: AWX - Ajax based Webinterface for XBMC (Dharma Beta 2)
Reply
MKay Wrote:Can anyone tell me how to handle virtual playlists correctly?

Actually i only need an AudioPlaylist (and of course a VideoPlaylist) where i can add and remove songs and play a specific item. Everything works fine with the JSON-API except that there is no remove-method for AudioPlaylist and VideoPlaylist.
But there is a remove-method for virtual playlists. So i considered to use virtual playlists. But i don't know how to handle them correctly.
I know i can use Playlist.Create to create a v-playlist and Playlist.Add to add songs, albums and files. And then i can use XBMC.Play to play the v-playlist. But what about playlist changes? For example i remove some elements from the v-playlist. How do i pass the new v-playlist to the currently playing one without stopping the current song or restarting the playlist from the beginning?

Sadly the whole playlist management is flawed, even in xbmc core. This reflects why the API is very flaky on playlists.

Ideally starting a virtual playlist and you should probably be able to remove from it and it reflects in GUI. However this is not the case.

If you create and add items to a virtual playlist and start playing it there is no way to update / sync it without restarting the playback.

Playlist management is something that we really need to fix for eden.

EDIT: And when now I see remove and insert is commited to svn Smile http://trac.xbmc.org/changeset/34390 will check if its backportable
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
Well,

I would actually like to make a tool to manage my music (m3u) playlists remotely, like you can do in xbmc, but that doesn't seem able with the current json-rpc.

Is that something that could be added in short-term or would playlists-backend need to be overhauled in xbmc first?
Reply
jitterjames Wrote:thanks, but I'm talking about calling python script that would run on xbmc. So for example if I wanted to create a custom OSD window in XBMC to show information sent from my program via JSON. (edit: or if I wanted to perform multi-command macros, it might be more efficient to make one call to a python script and have it execute the various steps, rather than sending multiple commands via JSON)

I'm sure that your code would still be helpful to look at for myself and others though.

See here my code: http://forum.xbmc.org/showthread.php?tid=82520
Reply
jitterjames Wrote:thanks, but I'm talking about calling python script that would run on xbmc. So for example if I wanted to create a custom OSD window in XBMC to show information sent from my program via JSON. (edit: or if I wanted to perform multi-command macros, it might be more efficient to make one call to a python script and have it execute the various steps, rather than sending multiple commands via JSON)

I'm sure that your code would still be helpful to look at for myself and others though.

Just wanted to say that me and Malard have discussed macros and its been decided that xbmc's jsonrpc will support it, so it will be possible to send an array (as per jsonrpc spec) of commands and you'll get an array of results back.

When it will be added is not decided yet but hopefully for eden.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
Hey Guys, I am building the WinPhone7 xbmc remote app and have few questions about playlist management. I see there are 3 different ways to interact with playlists
1. Playlist
2. AudioPlaylist
3. VideoPlaylist
What are the differences in Playlist vs others. Do I need to use more than one at a time to play audio and video.

I am planning to add support for following -
1. Ability to play and queue multiple songs, albums etc. I believe I need to use AudioPlaylist for this. Assuming I would Add with proper file or songid etc. and they can call AudioPlaylist.Play.

2. For Video,is it similar?
What do I need to use Playlist for ?
Can somebody please provide some information?

thanks,
Reply
  • 1
  • 22
  • 23
  • 24(current)
  • 25
  • 26
  • 226

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