• 1
  • 141
  • 142
  • 143(current)
  • 144
  • 145
  • 226
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
(2012-08-09, 00:59)Martijn Wrote:
(2012-08-09, 00:55)dwagner Wrote:
(2012-08-06, 13:37)Montellese Wrote: THESE CHANGES BREAK BACKWARDS COMPATIBILITY WITH VERSION 4 OF JSON-RPC API!!!
  • a lot of properties which were returned as a concatenated string with a "/" seperator are now returned as arrays of strings instead. This should make parsing the response a lot easier for clients.
I grew to like the old "/" separated arrays Wink I wish you would have made a parameter option to query using the old delimited array or rather the other way around so as not to completely break backward compatibility. I cache this data to a file in my remotes, so adding a loop for multiple parameters in each movie is more costly (thankfully this is only done once).

Keeping both is just a no-go code wise. Just to messy.
Beside some more things will probably break in coming months
What he said.

(2012-08-09, 01:11)N3MIS15 Wrote: is there any way to set thumbnail/fanart for movie sets and seasons over json api?
No there isn't. I'll have to look into it but I can't promise anything as both movie sets and seasons are special concepts (in the way they are implemented) in XBMC.

(2012-08-09, 02:44)dwagner Wrote: I'm getting a crash every time I try run JSONRPC.Introspect (latest build: xbmc-20120808-0531bbf-master-x86_64)

Code:
{"method":"JSONRPC.Introspect","id":1,"jsonrpc":"2.0"}

I wanted to file this in trac, but it seems I've somehow forgotten my username and password and for the life of me I can't find an option to reset it. Not to mention that clicking Help/Guide goes to a page not found.
Just tried it with the latest nightly build and I didn't have any problems. Concerning Trac your username should be the same as in the forums. Not sure about the password but might be the same as well.

(2012-08-09, 03:55)dwagner Wrote: I have a question regarding the new image URL's provided by JSON API 5. Are these URL's temporary. In other words, if I query a movie save the URL, and only try retrieve the image via the image:// URL a few days and many other queries later, will it still work.

In my remote I cache all these URL's and retrieve the images only when needed.
They are valid as long as the image doesn't change. The image path you get from JSON-RPC is the path to where the image actually came from. If you change the image it is very likely that it will come from a different origin and therefore the path will change.

(2012-08-09, 07:14)N3MIS15 Wrote: The introspect shows year, originaltitle and imdbnumber as valid properties for VideoLibrary.SetTVShowDetails but none of them seem to work. Are they even sure they're supposed to be in there?

Maybe 'tvdbnumber' could be used for tv shows? Or both?

You are right that year doesn't make sense for tvshows. But originaltitle and imdbnumber (which in this case is most likely an identifier from tvdb) should be set when you provide it. I just tested it and it seems like none of the properties can currently be changed with SetDetailsForTVShow (haven't tried the others yet). I'll look into it ASAP.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
(2012-08-09, 00:59)Martijn Wrote:
(2012-08-09, 00:55)dwagner Wrote:
(2012-08-06, 13:37)Montellese Wrote: THESE CHANGES BREAK BACKWARDS COMPATIBILITY WITH VERSION 4 OF JSON-RPC API!!!
  • a lot of properties which were returned as a concatenated string with a "/" seperator are now returned as arrays of strings instead. This should make parsing the response a lot easier for clients.
I grew to like the old "/" separated arrays Wink I wish you would have made a parameter option to query using the old delimited array or rather the other way around so as not to completely break backward compatibility. I cache this data to a file in my remotes, so adding a loop for multiple parameters in each movie is more costly (thankfully this is only done once).

Keeping both is just a no-go code wise. Just to messy.
Beside some more things will probably break in coming months

Is there any list of the planned changed that will break compatibility ?
Since some of us use databases to get local copy of data some changes generates quite a lot of impact (not necessarily bad thing since for example genre as array for movies are good).
But changing database schema each month can be problematic, if we know about some other incoming big changes we can postpones the databases changes to later and for now redo the concatenation.
Reply
(2012-08-09, 11:31)Tolriq Wrote: Is there any list of the planned changed that will break compatibility ?
Since some of us use databases to get local copy of data some changes generates quite a lot of impact (not necessarily bad thing since for example genre as array for movies are good).
But changing database schema each month can be problematic, if we know about some other incoming big changes we can postpones the databases changes to later and for now redo the concatenation.

To be honest I don't plan that far ahead. I never know how much time I have to work on XBMC and new ideas are usually spontaneous. There are two actions that I can predict and those are removing HTTP-API and removing the VFS handler of the webserver.

I know that supporting a moving target (which is what JSON-RPC is between stable releases) can be a pain that's why we kept JSON-RPC backwards compatible for a while now so that you guys could start adapting to the new features first before having to deal with major changes in the API.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
(2012-08-08, 20:31)Mizaki Wrote: I can't see a ticket for this one. But first...

VideoLibrary.GetGenres doesn't appear to honour sort. Example:
Code:
{"jsonrpc": "2.0", "method": "VideoLibrary.GetGenres", "params": { "type": "movie" }, "sort": { "method": "label" }, "id": 1}

Returns in genreid order. Unless I'm being stupid as is always possible Smile

Just tested that exact query on latest master and the sorting works perfectly fine. I get alphabetical sorting starting with "Action" (genreid = 4) then "Adventure" (genreid = 2) and so on.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
(2012-08-09, 10:17)Montellese Wrote:
(2012-08-09, 07:14)N3MIS15 Wrote: The introspect shows year, originaltitle and imdbnumber as valid properties for VideoLibrary.SetTVShowDetails but none of them seem to work. Are they even sure they're supposed to be in there?

Maybe 'tvdbnumber' could be used for tv shows? Or both?

You are right that year doesn't make sense for tvshows. But originaltitle and imdbnumber (which in this case is most likely an identifier from tvdb) should be set when you provide it. I just tested it and it seems like none of the properties can currently be changed with SetDetailsForTVShow (haven't tried the others yet). I'll look into it ASAP.

I made a mistake while testing and setting originaltitle and imdbnumber works fine for me. I have removed the "year" parameter because it doesn't make any sense.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
Hello,

GetActivePlayers returns a list of players. In which case can there be more than one? I tried to get more than one but wasn't able to.
Reply
(2012-08-09, 15:55)Romep Wrote: Hello,

GetActivePlayers returns a list of players. In which case can there be more than one? I tried to get more than one but wasn't able to.

If you have a slideshow playing and listening to music for example
Reply
For the moment you can only have musicplayer and pictureplayer at the same time.

Like listening to music and the screensaver starts.
Reply
(2012-08-09, 11:49)Montellese Wrote:
(2012-08-08, 20:31)Mizaki Wrote: I can't see a ticket for this one. But first...

VideoLibrary.GetGenres doesn't appear to honour sort. Example:
Code:
{"jsonrpc": "2.0", "method": "VideoLibrary.GetGenres", "params": { "type": "movie" }, "sort": { "method": "label" }, "id": 1}

Returns in genreid order. Unless I'm being stupid as is always possible Smile

Just tested that exact query on latest master and the sorting works perfectly fine. I get alphabetical sorting starting with "Action" (genreid = 4) then "Adventure" (genreid = 2) and so on.

It was me (as usual). Sort wasn't in the param brackets Undecided
Image
AWXi - Ajax web interface. Wiki
Reply
(2012-08-09, 11:43)Montellese Wrote:
(2012-08-09, 11:31)Tolriq Wrote: Is there any list of the planned changed that will break compatibility ?
Since some of us use databases to get local copy of data some changes generates quite a lot of impact (not necessarily bad thing since for example genre as array for movies are good).
But changing database schema each month can be problematic, if we know about some other incoming big changes we can postpones the databases changes to later and for now redo the concatenation.

To be honest I don't plan that far ahead. I never know how much time I have to work on XBMC and new ideas are usually spontaneous. There are two actions that I can predict and those are removing HTTP-API and removing the VFS handler of the webserver.

I know that supporting a moving target (which is what JSON-RPC is between stable releases) can be a pain that's why we kept JSON-RPC backwards compatible for a while now so that you guys could start adapting to the new features first before having to deal with major changes in the API.

I understand that you want to remove the VFS handlers since it is a security risk and allows you to download almost any file from xbmc.

Currently the only way to retrieve audio playlists from xbmc is using the url special://musicplaylists. Is this also part of the vfs handlers and will there be an alternative after removing the handlers?

Will it still be possible to download/stream a file from xbmc using the url returned by Files.PrepareDownload, since today this function returns a vfs url and I am using those urls in my app to stream music files to android devices? Will there be an alternative url?
Reply
I am not sure if I already asked this before but AudioLibrary.GetAlbumDetails and AudioLibrary.GetSongs do not return the artistId in the json response of nightly builds whereas in Eden the artistId was returned with the same request.

"{\"jsonrpc\": \"2.0\", \"method\": \"AudioLibrary.GetSongs\", \"params\" : { \"properties\" : [\"title\", \"artist\", \"genre\", \"album\", \"track\", \"thumbnail\", \"file\", \"duration\", \"rating\", \"albumid\", \"artistid\", \"albumartist\"] }, \"id\" : 1 }"

"{\"jsonrpc\": \"2.0\", \"method\": \"AudioLibrary.GetAlbumDetails\", \"params\" : { \"albumid\" : %s , \"properties\": [ \"title\", \"description\", \"artist\", \"genre\", \"theme\", \"mood\", \"style\", \"type\", \"albumlabel\", \"rating\", \"year\", \"musicbrainzalbumid\", \"musicbrainzalbumartistid\", \"fanart\", \"thumbnail\", \"artistid\"]}, \"id\" : 1 }"
Reply
(2012-08-09, 22:54)Millencolin007 Wrote: I understand that you want to remove the VFS handlers since it is a security risk and allows you to download almost any file from xbmc.

Currently the only way to retrieve audio playlists from xbmc is using the url special://musicplaylists. Is this also part of the vfs handlers and will there be an alternative after removing the handlers?

Will it still be possible to download/stream a file from xbmc using the url returned by Files.PrepareDownload, since today this function returns a vfs url and I am using those urls in my app to stream music files to android devices? Will there be an alternative url?

Files.PrepareDownload will fail on anything except cached images. The problem with access to media files is that it is very difficult to draw a line of what should be accessible and what not. Every user would probably provide you with a different answer so for now only providing access to the cached images is the safest solution. Hopefully there will be ways to access media files managed by XBMC in the future but we haven't thoroughly discussed this yet.

(2012-08-09, 23:11)Millencolin007 Wrote: I am not sure if I already asked this before but AudioLibrary.GetAlbumDetails and AudioLibrary.GetSongs do not return the artistId in the json response of nightly builds whereas in Eden the artistId was returned with the same request.

"{\"jsonrpc\": \"2.0\", \"method\": \"AudioLibrary.GetSongs\", \"params\" : { \"properties\" : [\"title\", \"artist\", \"genre\", \"album\", \"track\", \"thumbnail\", \"file\", \"duration\", \"rating\", \"albumid\", \"artistid\", \"albumartist\"] }, \"id\" : 1 }"

"{\"jsonrpc\": \"2.0\", \"method\": \"AudioLibrary.GetAlbumDetails\", \"params\" : { \"albumid\" : %s , \"properties\": [ \"title\", \"description\", \"artist\", \"genre\", \"theme\", \"mood\", \"style\", \"type\", \"albumlabel\", \"rating\", \"year\", \"musicbrainzalbumid\", \"musicbrainzalbumartistid\", \"fanart\", \"thumbnail\", \"artistid\"]}, \"id\" : 1 }"

night199uk is working on re-organizing the musicdatabase. The problem with the "artistid" is/was that an album can have more than one artist but the artistid only returned one value. As a "replacement" you can now call AudioLibrary.GetArtists with a "filter" parameter containing either a "albumid" property or a "songid" property (which is not possible in Eden) and you'll get a list of all artists of a specific album/song.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
(2012-08-09, 10:17)Montellese Wrote:
(2012-08-09, 02:44)dwagner Wrote: I'm getting a crash every time I try run JSONRPC.Introspect (latest build: xbmc-20120808-0531bbf-master-x86_64)

Code:
{"method":"JSONRPC.Introspect","id":1,"jsonrpc":"2.0"}

I wanted to file this in trac, but it seems I've somehow forgotten my username and password and for the life of me I can't find an option to reset it. Not to mention that clicking Help/Guide goes to a page not found.
Just tried it with the latest nightly build and I didn't have any problems. Concerning Trac your username should be the same as in the forums. Not sure about the password but might be the same as well.
The problem is with the OSX build. I tried the latest OSX and Windows builds. The OSX build crashed on JSONRPC.Introspect and the Windows build did not. There are other JSON commands that crash for me on OSX. I read an earlier post where you mentioned you are going to try and test on OSX, so I guess it will be sorted once you get a chance to do that.

I've come right with my trac account again. Though if you already have a trac about the OSX JSON then there is no need for me to post a new issue.
Reply
Can anyone point out what I'm doing wrong here? I've simplified the call as much as possible.

The tvshowid is valid and was returned by a previous call to VideoLibrary.GetEpisodes.

Code:
{"jsonrpc": "2.0", "method": "VideoLibrary.GetTVShowDetails", "params": {"tvshowid": 1882,"properties": ["title"]}, "id": "VideoLibrary.GetTVShowDetails"}

Returns:
Code:
{"error":{"code":-32602,"message":"Invalid params."},"id":"VideoLibrary.GetTVShowDetails","jsonrpc":"2.0"}

Using the official Eden release on PC.

Thanks,
Matt.
Reply
(2012-08-10, 04:31)doozer Wrote: Can anyone point out what I'm doing wrong here? I've simplified the call as much as possible.

The tvshowid is valid and was returned by a previous call to VideoLibrary.GetEpisodes.

Code:
{"jsonrpc": "2.0", "method": "VideoLibrary.GetTVShowDetails", "params": {"tvshowid": 1882,"properties": ["title"]}, "id": "VideoLibrary.GetTVShowDetails"}
I've copy pasted your code and tested it on my OSX XBMC Eden (I just changed the tvshowid to a valid one in my library) and it worked perfectly for me. The only time I got the error you mentioned was when I put an invalid tvshowid.
Reply
  • 1
  • 141
  • 142
  • 143(current)
  • 144
  • 145
  • 226

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