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 - 2012-02-16 17:21

JSON-RPC does not yet provide any filtering functionality but once that's possible I'm sure scripts like watchlist can be improved to only fetch as much data through JSON-RPC as necessary. JSON-RPC is still very young but it's contantly growing (once the feature freeze is over Wink).

But still things can only be optimised so much and people have to keep and mind that a low-end device like an ATV2, an iPad and most embedded devices (compared to a normal computer) does not provide as much power as other systems do. Every system has a drawback, one has a fast boot-time but not much ponies and the other has a longer boot-time but enough power to handle anything you throw at it.


- bthusby - 2012-02-16 23:26

Montellese Wrote:JSON-RPC does not yet provide any filtering functionality but once that's possible I'm sure scripts like watchlist can be improved to only fetch as much data through JSON-RPC as necessary. JSON-RPC is still very young but it's contantly growing (once the feature freeze is over Wink).

But still things can only be optimised so much and people have to keep and mind that a low-end device like an ATV2, an iPad and most embedded devices (compared to a normal computer) does not provide as much power as other systems do. Every system has a drawback, one has a fast boot-time but not much ponies and the other has a longer boot-time but enough power to handle anything you throw at it.

Thanks for answer.

Yes, I understand that the ATV2 is a light weight box, and I use it with the Quartz skin which is brilliant for low performance purposes.

I'm looking forward to the natural evolution of more optimal code for handling Libraries / DB queries and parsing of filtered JSON-RPC in the future. In my opinion this is core functionality that should be made absolutely as efficient as possible Smile


- doozer - 2012-02-17 09:07

Will future releases notify the user when changes are made to the playlist, or did I miss something in the docs?

Something like Playlist.OnUpdate perhaps?


- Montellese - 2012-02-17 09:59

Something like this will be available once the whole playlist handling has been refactored inside XBMC. Currently there are too many entry points to cover.


- Montellese - 2012-02-17 11:46

Tolriq Wrote:About this ticket Smile

I've got a new need that comes with it, it was already discussed before i think but can't remember when, and get into this new need Sad

Do you think it's possible for some of the player operations to add the support of PlayerId -1 that will pause / play whatever is currently running, even if music and pictures are running ?

See : http://forum.xbmc.org/showthread.php?p=1018502#post1018502 for more details of why it may be needed.

One solution actually since playerid are limited to 1 2 3 is to send a batch of the 3 commands, but perhaps the -1 would be more coder friendly.

Please add a feature request ticket for this. I can't guarantee though that it will ever be added because I think it will make people lazy and nobody will ever care to check Player.GetActivePlayers() before calling Player.PlayPause() so it is very likely to be "abused".


- Tolriq - 2012-02-17 12:34

Ticket added : http://trac.xbmc.org/ticket/12663

As long as the id does not change, we can batch the pause for id 1 and 2, but this is just another way to abuse the system Smile

Instead of id -1 I've think about just adding a new command like PlayPauseAll so we don't allow -1 only on some commands and people get lost. Just a special command for special cases.


- Mizaki - 2012-02-18 21:57

Am I miss understanding limits or is it +1 on the total and end?
On movies for example:
Code:
{ end=597, start=0, total=597 }
Yet the last in the movies array is 596. Same thing with TV, artists and albums. I've not checked the rest.


- Montellese - 2012-02-18 22:26

It's probably more that the name "end" is a bit confusing and the fact that indices always start at 0 in computing so the last element is size -1 (or total - 1). It means something like "size" but not with the same meaning as the "total" property. "total" tells you how many items there are if you would not limit the list. "end" tells you how many items there are in the list that is part of the response.

I'll probably add a description to the "end" property to make it easier to understand.


- Mizaki - 2012-02-18 23:00

Okay, thanks. I could understand the total starting from 1 but as "start" starts from 0 I was expecting "end" to end 596.


- Montellese - 2012-02-18 23:02

Yeah like I said the naming choice "end" is not very good but it has been there since the beginning of JSON-RPC.