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 - gertjanzwartjes - 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.

Would be great, thanks!


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

Fixed in master so will be in Frodo final.


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

Great news, very thanks Montellese.


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

(2012-12-11, 09:25)Montellese Wrote:
(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.

Here's a debug log just incase it will help.. http://xbmclogs.com/show.php?id=21589
"Type mismatch in type" seems to be a common theme. I hate to be that guy but i hope this can be fixed for frodo final.



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

I remember now why the updating of these fields doesn't work. The problem is that when you update your music library the next time it will overwrite all the changes you made or rather it will add a new artist/album/... with the old details as they are stored in the ID3 tags. I can probably work around the problem that the values are not updated but there's no way to get around the problem that the data you change is invalidated during the next music library update.


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

Quick question about VideoLibrary.GetTVShows. I'm using a simple query to get all tv shows and some fields. I currently have:

Code:
{"jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "params": {"properties":["studio", "genre"]}, "id": 1}

This worked in Eden...all shows were returned with the title, tv network, and genre (or whatever fields I want). In Frodo, I only end up with the title though. A similar query with VideoLibrary.GetMovies still works. Has GetTVShows changed?


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

(2012-12-21, 04:57)Jason102 Wrote: Quick question about VideoLibrary.GetTVShows. I'm using a simple query to get all tv shows and some fields. I currently have:

Code:
{"jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "params": {"properties":["studio", "genre"]}, "id": 1}

This worked in Eden...all shows were returned with the title, tv network, and genre (or whatever fields I want). In Frodo, I only end up with the title though. A similar query with VideoLibrary.GetMovies still works. Has GetTVShows changed?

Hm that exact request works perfectly fine here in my test library
Code:
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "limits": {
            "end": 11,
            "start": 0,
            "total": 11
        },
        "tvshows": [{
            "genre": ["Comedy"],
            "label": "Seinfeld",
            "studio": ["NBC"],
            "tvshowid": 11
        }, {
            "genre": ["Comedy"],
            "label": "Sex and the City",
            "studio": ["HBO"],
            "tvshowid": 10
        }, {
            "genre": ["Action and Adventure", "Science-Fiction"],
            "label": "Sliders",
            "studio": ["FOX"],
            "tvshowid": 9
        }, {
            "genre": ["Action and Adventure", "Drama", "Science-Fiction"],
            "label": "Star Trek: The Next Generation",
            "studio": ["Syndicated"],
            "tvshowid": 8
        },
        ..
        ]
    }
}



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

Are you taking into account those are now an array?


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

My mistake, I was outputting my parsed version of the return data to the log instead of the raw data. Since the parsing is wrong for Frodo (because of the new arrays) I was getting junk. I see that the raw return data is correct. My bad.


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

(2012-11-27, 22:55)yallah Wrote: Hi,

Don't why bluray iso can't open via json-rpc (working if I execute ISO from GUI)...

{"jsonrpc": "2.0", "method": "Player.Open", "params": {"item": {"file":"Z:\\Star Wars Episode III - Revenge of the Sith (2005)\\Star Wars Episode III - Revenge of the Sith (2005).iso"}}, "id": 1}

http://pastebin.com/GBAtARU8

thx for your help

Same problem here. Bluray ISO files fail to play using JSONRPC on Frodo RC2, but play fine using GUI. Other files play fine using the same commands This worked in Eden....

JSON conversation
Code:
{"id":34,"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"file":" smb://AV-NAS/media/Movies/The Amazing Spider-Man/The Amazing Spider-Man.ISO"}}}

Responses:
{"jsonrpc":"2.0","method":"Playlist.OnClear","params":{"data":{"playlistid":1},"sender":"xbmc"}}
{"jsonrpc":"2.0","method":"Player.OnStop","params":{"data":{"end":false,"item":{"id":27,"type":"movie"}},"sender":"xbmc"}}
{"id":34,"jsonrpc":"2.0","result":"OK"}

It would appear the crux of the issue is the GUI is doing some sort of conversion, selecting the index file, adding bluray://udf:// and URLEncoding it... or bluray detection is failing somehow. With the GUI you get the popup selection dialog for bluray, this doesn't happen in the JSONRPC case.

XBMC Logs
Code:
From GUI:
NOTICE: DVDPlayer: Opening: bluray://udf%3a%2f%2fsmb%253a%252f%252fAV-NAS%252fmedia%252fMovies%252fThe%2520Amazing%2520Spider-Man%252fThe%2520Amazing%2520Spider-Man.ISO%2f/BDMV/PLAYLIST/00001.mpls

From JSONRPC:
NOTICE: DVDPlayer: Opening: smb://AV-NAS/media/Movies/The Amazing Spider-Man/The Amazing Spider-Man.ISO


Ticket Opened #13842 (Logs Attached)


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

(2012-12-28, 17:40)wuench Wrote:
(2012-11-27, 22:55)yallah Wrote: Hi,

Don't why bluray iso can't open via json-rpc (working if I execute ISO from GUI)...

{"jsonrpc": "2.0", "method": "Player.Open", "params": {"item": {"file":"Z:\\Star Wars Episode III - Revenge of the Sith (2005)\\Star Wars Episode III - Revenge of the Sith (2005).iso"}}, "id": 1}

http://pastebin.com/GBAtARU8

thx for your help

Same problem here. Bluray ISO files fail to play using JSONRPC on Frodo RC2, but play fine using GUI. Other files play fine using the same commands This worked in Eden....

JSON conversation
Code:
{"id":34,"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"file":" smb://AV-NAS/media/Movies/The Amazing Spider-Man/The Amazing Spider-Man.ISO"}}}

Responses:
{"jsonrpc":"2.0","method":"Playlist.OnClear","params":{"data":{"playlistid":1},"sender":"xbmc"}}
{"jsonrpc":"2.0","method":"Player.OnStop","params":{"data":{"end":false,"item":{"id":27,"type":"movie"}},"sender":"xbmc"}}
{"id":34,"jsonrpc":"2.0","result":"OK"}

It would appear the crux of the issue is the GUI is doing some sort of conversion, selecting the index file, adding bluray://udf:// and URLEncoding it... or bluray detection is failing somehow. With the GUI you get the popup selection dialog for bluray, this doesn't happen in the JSONRPC case.

XBMC Logs
Code:
From GUI:
NOTICE: DVDPlayer: Opening: bluray://udf%3a%2f%2fsmb%253a%252f%252fAV-NAS%252fmedia%252fMovies%252fThe%2520Amazing%2520Spider-Man%252fThe%2520Amazing%2520Spider-Man.ISO%2f/BDMV/PLAYLIST/00001.mpls

From JSONRPC:
NOTICE: DVDPlayer: Opening: smb://AV-NAS/media/Movies/The Amazing Spider-Man/The Amazing Spider-Man.ISO


Ticket Opened #13842 (Logs Attached)


Hi,

For me elupus repair my problem ( https://github.com/xbmc/xbmc/commit/96522a115781c883a731db0aa32e42d01e264e5d )

Iso is working, with json since this commit.





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

Is this in the nightlies? Because I just installed XBMCSetup-20121227-d4d9b3e-master.exe and it is still not working for me...


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

(2012-12-28, 19:33)wuench Wrote: Is this in the nightlies? Because I just installed XBMCSetup-20121227-d4d9b3e-master.exe and it is still not working for me...

Should have yes.
add a full Debug Log to the ticket you made and i'll reopen it


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

(2012-12-28, 19:36)Martijn Wrote:
(2012-12-28, 19:33)wuench Wrote: Is this in the nightlies? Because I just installed XBMCSetup-20121227-d4d9b3e-master.exe and it is still not working for me...

Should have yes.
add a full debug log to the ticket you made and i'll reopen it

Done. Looks pretty much the same as the RC2 log


Yallah what version are you currently running where it is fixed for you?


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

Just install by exemple the 28-Dec-2012 nightly. Work very well,

I use letter mapping and smb path. My exemple working very well:

{"jsonrpc": "2.0", "method": "Player.Open", "params": {"item": {"file":"smb://DISKSTATION/video/Star Wars episode III - La Revanche des Sith (2005)/Star Wars episode III - La Revanche des Sith (2005).iso"}}, "id": 1}

CAUTION: Must respect letter case (I don't know How can I explain in english Smile ). By exemple are you sure it's .ISO and not .iso (can you change file and json command with lower case ?? and "perhaps" do another scan