Kodi Community Forum
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174)
+---- Thread: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC (/showthread.php?tid=68263)



RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2012-12-09

Hi, a little question about Thumbs.
For now i am geting the thumbs for movies and tvshow using a simple function to mount the path.
Quote:self.URL + "vfs/" + data.result.movies[i].thumbnail
Then i get this url for the thumbs
[quote]http://xbmc:@192.168.0.101:8080/vfs/image://N%3a%5cMovies%5c3D_SBS%5cCars%202%20(2011)%5cCars%202%20(2011).3dbd.tbn/[quote]
But the thums its very big, i need to find a way to get this in a small size. There is anyway to request the thumbs in a small size ? or better, can i request this thumb with a specific size ?
I am resizing the images in my app, but its very slow make this for severals thumbs.
I am sorry my bad english.
Thanks for the help
Clayton
p.s newbie question, how i can see this thumbs in my brownser on the pc ?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-12-09

Currently there's no resizing functionality but it's on the TODO list.

You can just put that HTTP URL into your browser and you should see the image.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2012-12-09

Thanks for your help.
I tried to put the url in a browser and dont work, maybe i have to change something.
About the thumbs, when i request the url, from where exactly the xbmc get this image ? From the userdata thumbnail folder ? I read some old posts in this topic about use vfs or vfs/image, can you explain what is the diference ? We get difenctly size of pictures ?
Thanks again


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-12-09

/image is the new way to get images and in the future it will offer resizing etc (which will not be available for /vfs). If the image is already in the cache (i.e. the userdata thumbnail folder) it is retrieved from there, otherwise it is copied there from the original location and then returned from the cache.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - gertjanzwartjes - 2012-12-10

Don't know if this has already been reported, but I noticed that with Frodo (I tested with beta3) Player.Seek with "(big|small)forward" and "(big|small)backward" are not working anymore for audio items (does work for video).


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2012-12-10

Thanks Montellese.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - N3MIS15 - 2012-12-11

Using beta3, I cant seem to get AudioLibrary.SetArtistDetails "artist" field to work.. Other fields I've tried seem to be fine.

REQUEST:
Code:
{
    "params": {
        "artistid": 2,
        "artist": "test"
    },
    "jsonrpc": "2.0",
    "id": 0,
    "method": "AudioLibrary.SetArtistDetails"
}

RESULT:
Code:
{
    "jsonrpc": "2.0",
    "id": 0,
    "result": "OK"
}

But the artist field is not updated, here is the result of a filtered AudioLibrary.GetArtists made after the SetArtistDetails:
Code:
{
    "jsonrpc": "2.0",
    "id": 0,
    "result": {
        "limits": {
            "start": 0,
            "total": 1,
            "end": 1
        },
        "artists": [
            {
                "artistid": 2,
                "label": "30 Seconds To Mars",
                "artist": "30 Seconds To Mars"
            }
        ]
    }
}

EDIT: Getting the same problem with AudioLibrary.SetAlbumDetails.. At the very least the "artist", "title" and "genre" fields are not updating.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-12-11

(2012-12-10, 22:48)gertjanzwartjes Wrote: Don't know if this has already been reported, but I noticed that with Frodo (I tested with beta3) Player.Seek with "(big|small)forward" and "(big|small)backward" are not working anymore for audio items (does work for video).
It never worked since the new AudioEngine got merged which came with a complete rewrite of XBMC's music player. It's not a JSON-RPC limitation, it's a player limitation.

(2012-12-11, 04:19)N3MIS15 Wrote: Using beta3, I cant seem to get AudioLibrary.SetArtistDetails "artist" field to work.. Other fields I've tried seem to be fine.

REQUEST:
Code:
{
    "params": {
        "artistid": 2,
        "artist": "test"
    },
    "jsonrpc": "2.0",
    "id": 0,
    "method": "AudioLibrary.SetArtistDetails"
}

RESULT:
Code:
{
    "jsonrpc": "2.0",
    "id": 0,
    "result": "OK"
}

But the artist field is not updated, here is the result of a filtered AudioLibrary.GetArtists made after the SetArtistDetails:
Code:
{
    "jsonrpc": "2.0",
    "id": 0,
    "result": {
        "limits": {
            "start": 0,
            "total": 1,
            "end": 1
        },
        "artists": [
            {
                "artistid": 2,
                "label": "30 Seconds To Mars",
                "artist": "30 Seconds To Mars"
            }
        ]
    }
}

EDIT: Getting the same problem with AudioLibrary.SetAlbumDetails.. At the very least the "artist", "title" and "genre" fields are not updating.
I'll look into it when I got some time during this week.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - gertjanzwartjes - 2012-12-11

(2012-12-11, 09:25)Montellese Wrote:
(2012-12-10, 22:48)gertjanzwartjes Wrote: Don't know if this has already been reported, but I noticed that with Frodo (I tested with beta3) Player.Seek with "(big|small)forward" and "(big|small)backward" are not working anymore for audio items (does work for video).
It never worked since the new AudioEngine got merged which came with a complete rewrite of XBMC's music player. It's not a JSON-RPC limitation, it's a player limitation.
Ok, thanks for the info. Is it going to be supported at some point? I can think of some dirty tricks to implement similar functionality, which might not be needed if support is coming back. Thanks.



RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-12-11

Tbh I don't really know. I reported it several times and it's a known issue but gnif (who re-wrote the music player) is currently not active and personally I don't have any clue how the music player works.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - gertjanzwartjes - 2012-12-11

Ok, I see. I'll see if I can implement something similar like a smallskip by getting current time and seeking +/- 30s if the current player is the audio player. It's a bit ugly, but it probably will do the trick.

Thanks for the quick response again!


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-12-11

Hm I thought seeking doesn't work either. If it does it's probably just a matter of hooking up the proper actions in the player to interprete the small/big skip forward/backward.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - gertjanzwartjes - 2012-12-11

I just double checked and normal seek (using a percentage value) does work.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-12-11

I just checked the implementation of the player and seeking to a specific time or percentage is implemented but relative seeking is missing. Maybe I can get that working myself.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - claymic - 2012-12-11

(2012-12-11, 14:47)Montellese Wrote: I just checked the implementation of the player and seeking to a specific time or percentage is implemented but relative seeking is missing. Maybe I can get that working myself.
This will be great, since i will start to make the control music for my app.
Very thanks