• 1
  • 183
  • 184
  • 185(current)
  • 186
  • 187
  • 226
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
Just when I thought I was getting a good grasp on the JSON syntax I'm getting an error that I can't figure out why. I'm trying to update several movie parameters at once. It seems as though if I do the movieid and one other parameter, it's successful, but if I add one (or more) additional parameters, then I get an error such as the one below. I'm sure it's something simple, but I haven't been able to figure out what I'm doing wrong.

What I'm trying:
Code:
{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": {"movieid": 130, "Movietitle": "Moviename", "plot": "this is where the plot goes"}, "id": 1}

Error in return:
Code:
{"error":{"code":-32602,"data":{"message":"Too many parameters","method":"VideoLibrary.SetMovieDetails","stack":{"name":"plot","type":["null","string"]}},"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}
Reply
"Movietitle" should just be "title"
Image
Reply
Ugh.. you know how many times I looked at the API details for that on the wiki page and I *never* noticed that. Sure enough, it's spelled out as plain as can be "[ Optional.String title = null ]". Thanks N3MIS15!
Reply
Just discover a strange limitation in Player.PlayPause.

If you force play while in fastforwarding or rewinding then the player does not change to play but keeps it's current state.
This behavior is quite different from gui or eventserver.

https://github.com/xbmc/xbmc/pull/2301 Smile
Reply
Is there a way to get lastmodifieddate from List.Item.File in a specific format, or alternatively is there a way to query the International Region setting?

Otherwise there is no way to really tell whether a date such as 01/02/13 is 2 Jan or 1 Feb
Reply
I was told that dates are in SQL format so YYYY-MM-DD HH:MM:SS no matter the local system settings.
Reply
My tests prove otherwise.

US 24 hour
"lastmodified":"01/24/2013 16:31:32"

UK 24 hour
"lastmodified":"24/01/2013 16:31:32"

UK 12 hour
"lastmodified":"24/01/2013 4:31:32 PM"
Reply
For some reason yet unknown to me "lastmodified" is provided in localized datetime representation whereas all other dates are provided in SQL format as stated by Tolriq. Will have to check if there's a reason for it or not.
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
Is it possible to use scraper remotely?
Reply
Currently not. There has been some initial work on this but that was quite a while ago and it needs to be adapted to the current state of the code.
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
Is it possible to get the full path to a currently played item via json-rpc? "Player.GetItem" returns only a library name/file name.
Reply
(2013-03-01, 18:47)Roman_V_M Wrote: Is it possible to get the full path to a currently played item via json-rpc? "Player.GetItem" returns only a library name/file name.
The "file" property should provide you with the full path as used by XBMC. Obviously that might not be accessible on a remote computer if it's a local drive or something like that.

EDIT: Tested and works fine for me.
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
(2013-03-01, 18:46)Montellese Wrote: Currently not. There has been some initial work on this but that was quite a while ago and it needs to be adapted to the current state of the code.

Is it planned to merge it into stable, or it's only experiment? I think it would be beneficial for media managers authors, and users of those managers using foreign languages. Now media managers use mainly English websites, and authors need to write their owns scrapers, while scrapers already exists in xbmc ready for use.
Reply
Apologies if this has already been explained, but I couldn't find it by searching.

I am trying to perform filtering on multiple criteria using one RPC. Is this possible? I have tried stuffing both filters in a list
Code:
{"params": {"filter": [{"operator": "is", "field": "playcount", "value": "0"}, {"operator": "greaterthan", "field": "rating", "value": "2"}], "properties": ["rating", "playcount", "lastplayed", "file", "resume", "tvshowid"], "limits": {"end": 2}}, "jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "id": 1}
but that gives me the following error
Code:
{"error":{"code":-32602,"data":{"method":"VideoLibrary.GetEpisodes","stack":{"message":"Invalid type array received","name":"filter","property":{"name":"end","type":"integer"},"type":"object"}},"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}

Any ideas?

Thanks in advance
Reply
(2013-03-01, 22:40)Marx1 Wrote: Is it planned to merge it into stable, or it's only experiment? I think it would be beneficial for media managers authors, and users of those managers using foreign languages. Now media managers use mainly English websites, and authors need to write their owns scrapers, while scrapers already exists in xbmc ready for use.
The work hasn't been done by me so I'm not really into it right now.

(2013-03-02, 14:49)Anthirian Wrote: Apologies if this has already been explained, but I couldn't find it by searching.

I am trying to perform filtering on multiple criteria using one RPC. Is this possible? I have tried stuffing both filters in a list
Code:
{"params": {"filter": [{"operator": "is", "field": "playcount", "value": "0"}, {"operator": "greaterthan", "field": "rating", "value": "2"}], "properties": ["rating", "playcount", "lastplayed", "file", "resume", "tvshowid"], "limits": {"end": 2}}, "jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "id": 1}
but that gives me the following error
Code:
{"error":{"code":-32602,"data":{"method":"VideoLibrary.GetEpisodes","stack":{"message":"Invalid type array received","name":"filter","property":{"name":"end","type":"integer"},"type":"object"}},"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}

Any ideas?

Thanks in advance
You need to tell the "filter" how to combine your rules, either with "and" or with "or". An example with "and" would look like this:
Code:
{"params": {"filter": { "and": [{"operator": "is", "field": "playcount", "value": "0"}, {"operator": "greaterthan", "field": "rating", "value": "2"}] }, "properties": ["rating", "playcount", "lastplayed", "file", "resume", "tvshowid"], "limits": {"end": 2}}, "jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "id": 1}
The "filter" property has to be an object (and not an array) and it can either contain a single rule, or an "and" or "or" property which then is an array of rules or can again contain (nested) objects with "and" and "or" property. Yeah I know it can get very confusing.
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
  • 1
  • 183
  • 184
  • 185(current)
  • 186
  • 187
  • 226

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