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.
I like to query the music artists with sortmethod ascending. Is this possible?

I only get parse errors.
How does your JSON RPC call look like?
Sorry 4 posting. I found my error. I missed one } at the end of the ascending method.
Following my solution. Maybe it's helpful for someone.

NSString *json = @"{\"jsonrpc\": \"2.0\", \"method\": \"AudioLibrary.GetArtists\", \"params\": {\"fields\": [\"artist\"],\"sort\":{\"method\":\"artist\",\"order\":\"ascending\"}},\"id\": 1}";
I already thought that there might be such a small syntax problem Wink
I'd like to push a request that's been here before:

Querying movie items by movieid.

Background:
- I've got a set of movie items that don't show up on VideoLibrary.GetMovies (because they are in a movie set), but lets say i know their movieids. I've tried hard but i couldn't find a way to get movie details for these via JSON.
- Since the movieid is the leading / unique identifier it would simply make sense (imho) to be able to query items by id. I know this can be done by sorting and start / end filtering, but: To know the items position in the list, i need to query the whole list first (if i'm not mistaken?) - and: Who guaranties the the items position didn't change between the initial list query and the filtered query?

Keep up the good work!
grywnn Wrote:I'd like to push a request that's been here before:

Querying movie items by movieid.

Background:
- I've got a set of movie items that don't show up on VideoLibrary.GetMovies (because they are in a movie set), but lets say i know their movieids. I've tried hard but i couldn't find a way to get movie details for these via JSON.
- Since the movieid is the leading / unique identifier it would simply make sense (imho) to be able to query items by id. I know this can be done by sorting and start / end filtering, but: To know the items position in the list, i need to query the whole list first (if i'm not mistaken?) - and: Who guaranties the the items position didn't change between the initial list query and the filtered query?

Keep up the good work!

I'm planning to add a way to query movie/music infos by id soon, as topfs seems very busy right now. Indeed, json announcements will take an id as parameter, allowing the recever to query informations about the announcements (ie, OnNewSong will pass the id of the new song added to the db, etc.)

I just need to find some free time to do it and have a talk with topfs before too Wink
Perfect!
blinkseb Wrote:I'm planning to add a way to query movie/music infos by id soon, as topfs seems very busy right now. Indeed, json announcements will take an id as parameter, allowing the recever to query informations about the announcements (ie, OnNewSong will pass the id of the new song added to the db, etc.)

I just need to find some free time to do it and have a talk with topfs before too Wink

I think its a good idea but when I coded the stuff I tried to do it and some stuff are really hard to get (mind you, quick look) with just the ID. Thumbs and stuff for one, there have been discussion of moving that info into the db though.

At any rate, its a good idea for sure. Only thing that might need to be noted is that don't rely on the ID's to always be the same, currently they probably are but its just safer code if you don't.
topfs2 Wrote:At any rate, its a good idea for sure. Only thing that might need to be noted is that don't rely on the ID's to always be the same, currently they probably are but its just safer code if you don't.

Sure thing.
While i'm at it:
Any news on movie sets?
I still have the problem that i get one dict per movie set when doing a VideoLibrary.GetMovies and have no way of getting the movies within.
Currently i'm doing this by falling back to http database queries. Btw thats where i get movieids which aren't in the initial VideoLibrary.GetMovies array.

I know this is rather db related than json-rpc, just curious if this is still on the screen somewhere.
I've got some free time today, so here we go : http://trac.xbmc.org/ticket/10728

Four new json methods, each allowing to retrieve informations about a specific movie/tvshow/episode/music video

I'll add the same thing for music library if it's relevant.
blinkseb Wrote:Four new json methods, each allowing to retrieve informations about a specific movie/tvshow/episode/music video
This is awesome. Its just what I needed. Do you guys know when you will be working on functionality to update the database for things like play count, file bookmarks, etc. I realize there is a security issue here you want to solve first. And I believe in the meantime I can use the HTTP API to run sql statements to do this.

I also have a question about GetTVShows. Is it possible to get the number of episodes and number of watched episodes in this request? I took a look at the source code and it looks like it ultimately goes through CVideoDatabase::GetTvShowsByWhere which loops through each tv show to get these values. But when I added these fields (totalepisodes, watchedepisodes) to my JSON-RPC request I didn't get the information back. I also want to get the same information from GetSeasons and GetEpisodes.

Thanks for the all the work you've put in.
Jordan Wrote:This is awesome. Its just what I needed. Do you guys know when you will be working on functionality to update the database for things like play count, file bookmarks, etc. I realize there is a security issue here you want to solve first. And I believe in the meantime I can use the HTTP API to run sql statements to do this.

For sure on the roadmap. We will allow any alterations to the database, will jstu not allow any sql querys but instead wrap it into nice little actions.
Hi,
why can't I use the webserver on port 80?
Even if I edit guisettings.xml manually it doesn't work.

thanks in advance
zoid
(sorry, search funtion routed me to a wrong (dev-) section)
ZOiD Wrote:Hi,
why can't I use the webserver on port 80?
Even if I edit guisettings.xml manually it doesn't work.

thanks in advance
zoid
(sorry, search funtion routed me to a wrong (dev-) section)

Yeah this is not the place and without a proper Debug Log its impossible.. But I'm gonna take a stab in the dark, if your running linux/osx/live any ports under 1024 are privileged which means you need to be root/admin to use them. Its bad running as root so just use ports above 1024.
... well of course you are right. Blush
Solved it with port redirecting with iptables.

thanks and sorry again for posting at the wrong place.