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 - Tolriq - 2014-07-09

Small fun issue reported by some users on Gotham and easily reproducible.

Start any media, move to a given position then pause it.

Next call to Player.Open will open the new media but will seek to the same position and left it paused.
A call to play will start the media from the start.

Quite disturbing experience for users.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Regss - 2014-07-16

I get error:
Code:
ERROR: JSONRPC: Failed to parse '{"jsonrpc": "2.0", "method": "Settings.SetSettingValue", "params": {"setting": "audiooutput.normalizelevels", "value": True}, "id": 1}'
other settings work without errors


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - syncd - 2014-07-17

Not sure if this is a bug, or if i'm misunderstanding something, so i would appreciate if someone could confirm this.

The issue is it looks like GetTVShows and GetTVShowDetails return inconsistent information in "watchedepisodes". GetTVShows returns the correct number, whereas GetTVShowDetails always returns 0 (AFAICT).

A GetTVShows request:
Code:
{ "id" : 203,
  "jsonrpc" : "2.0",
  "method" : "VideoLibrary.GetTVShows",
  "params" : { "properties" : [
          "episode",
          "playcount",
          "watchedepisodes"
        ] }
}

Returns:

Code:
{ "id" : 203,
  "jsonrpc" : "2.0",
  "result" : { "limits" : { "end" : 1,
          "start" : 0,
          "total" : 1
        },
      "tvshows" : [ {
            "episode" : 4,
            "label" : "Falling Skies",
            "playcount" : 0,
            "tvshowid" : 1,
            "watchedepisodes" : 2
          } ]
    }
}


GetTVShowDetails request:
Code:
{ "id" : 203,
  "jsonrpc" : "2.0",
  "method" : "VideoLibrary.GetTVShowDetails",
  "params" : { "properties" : [
          "episode",
          "playcount",
          "watchedepisodes"
        ],
      "tvshowid" : 1
    }
}

Returns:

Code:
{ "id" : 203,
  "jsonrpc" : "2.0",
  "result" : { "tvshowdetails" : {
          "episode" : 4,
          "label" : "Falling Skies",
          "playcount" : 0,
          "tvshowid" : 1,
          "watchedepisodes" : 0
        } }
}

"watchedepisodes" should be 2, but it is always 0 in GetTVShowDetails. GetTVShows reports the correct number.

It might be linked to this issue: http://trac.xbmc.org/ticket/14703

As i understand, in the code, playcount is used as a marker for the number of episodes watched, which is assigned to "watchedepisodes", and them set to 0/1 depending on whether all episodes where watched or not, but i can't find where the inconsistency between GetTVShows and GetTVShowDetails comes from.

Thanks


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-07-17

What version of xbmc and which version of the JSON-RPC API are you using?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - thica - 2014-07-17

(2013-02-11, 18:20)Montellese Wrote: @Tolriq: I'm currently very busy with finishing my master's thesis because I have to be done till end of February so I don't have much time for XBMC. I'll take a closer look as soon as that chapter of my life is finished Wink

@thica: IIRC there's no way to toggle watched/unwatched through JSON-RPC right now.


Hallo Montellese,

9 months later: has something improved with Gotham to toggle the watched state?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - syncd - 2014-07-18

(2014-07-17, 13:17)Montellese Wrote: What version of xbmc and which version of the JSON-RPC API are you using?

I've tested it with 13.1 in Linux and with 12.3 also on Linux. How can i check the JSON-RPC API version?

Thanks


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2014-07-30

@Montellese In case you missed it : http://forum.xbmc.org/showthread.php?tid=198388&page=2

Have not all details but it seems somes users have troubles with some version of libmicrohttpd.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Regss - 2014-08-05

How do I set dateadded for the movie?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Milhouse - 2014-08-11

I'm running the following query:

Code:
{"jsonrpc": "2.0", "params": {"limits": {"start": 0, "end": 1}}, "method": "VideoLibrary.GetTVShows", "id": "libStats"}

which returns an incorrect result for recent Helix builds.

This is what Gotham (OpenELEC 4.0.7 with MySQL) and Helix (commit bb3554c) returns:

Gotham/Helix:
Code:
{"id":"libStats","jsonrpc":"2.0","result":{"limits":{"end":1,"start":0,"total":61},"tvshows":[{"label":"Arrested Development","tvshowid":115}]}}

Helix from 6 July onwards:
Code:
{"id":"libStats","jsonrpc":"2.0","result":{"limits":{"end":1,"start":0,"total":1},"tvshows":[{"label":"Arrested Development","tvshowid":115}]}}

The total should be 61 in both cases, but is always 1 for builds on/after 6 July.

I've gone back through my old builds and this problem first appears with this build on 6 July. The commit changes for the build are listed in the link, the most obvious candidate is likely to be the PR4977 commit (Tvshow multipaths parentid). I'm testing with MySQL.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2014-08-13

@Montellese : I can confirm Milhouse behavior on Windows builds with sqlite too.

This is problematic since this block partial listing of Tv Shows as we have no way to known the number of available shows. And partial sync is needed on Rpi with large libraries Sad


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2014-08-14

I found the root of the problem, see c5691f1a3868f01d2d8e430ca4a218404d35f1a9. Let's see what jmarshall says and then we can find a solution.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2014-08-20

@Montellese : Don't know if it's related to the last changes in build system to have versions no more in GUIInfoManager.h but it seems TAG return prealpha for all builds even correct alpha ones. (Application.Property.Value)

And I don't know if it's possible to add / change the tag part to return the real tag as alpha1 or beta2 ... because revision does change a lot for each builds like rpi and such.
This would be a great tool for statistics about users update rate during the helix alpha / beta phase.


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

Yeah you are right. Changing the "tag" property would break backwards compatibility but I can certainly fix it to return the proper enum value and maybe add another property that contains the "version" of the tag.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Samtronic - 2014-09-02

Hi !
I have a problem with the command 'Profiles.LoadProfile'. I setup a password for the master profil. My second profil is 'Children' with no password. When I put a password for the master profile when I want to change the profil to Children
'{"jsonrpc":"2.0","method":"Profiles.LoadProfile","params":{"profile":"Children"},"id":1}. I have a this message '{"error":{"code":-32602,"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}'. If I remove the master password the command is ok. Why when I put a password for the master profil, I have a problem to change the Children profil.

Sorry for my bad english !Big Grin

Thanks
Steven


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2014-09-19

@Montellese : Got an interesting report today and can't really understand how it's handled at XBMC level Sad

Some users have albums as flac + cue file.

All is correctly handled in XBMC when playing songid, but when querying song details for local play or streaming it seems there's no way to get the cue information and so every songs only reports the full flac file (same for all) but without details on how to handle them.

Is this something that can be addressed ? Like a a new field or perhaps there's some bookmarks for that purpose that can be queried ?