• 1
  • 69
  • 70
  • 71(current)
  • 72
  • 73
  • 226
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
Question 
What is the recommended method to get the tvdb id that is stored in the db for a certain episode, why can't I get this with VideoLibrary.GetEpisodeDetails, the Library.Fields.Episode doesn't have a value for the tvdb id or even for the imdb id that is available from VideoLibrary.GetTVShowDetails.

And is this page http://wiki.xbmc.org/index.php?title=JSON_RPC maintained by hand, because the Library.Fields.Episode section doesn't list the avaliable fields which for reference are [ "title", "plot", "votes", "rating", "writer", "firstaired", "playcount", "runtime", "director", "productioncode", "season", "episode", "originaltitle", "showtitle", "cast", "streamDetails", "lastplayed", "fanart", "thumbnail", "file" ].
Image
Developer working on Trakt Utilties for XBMC (Download)
Please read Getting Support before asking for support.
Reply
Question 
In my utility I want XBMC to display any kind of media it supports. I am using the XBMC.Play method and pass it URL to the resource on the Internet.

It works fine with video files but not with images. The same images are displayed correctly when I use UPnP to control XBMC but I prefer json-rpc.

Is the Play method limited by design or is it a bug that I need to report?

I've tested on XBMC 10.1 on Windows and a bit older version on Linux.
Reply
I want to start with an FYI: With commit 482cb54953c7a450a4ff you can now use GetRecentlyAddedAlbums and GetRecentlyAddedSongs in the AudioLibrary namespace.

othrayte Wrote:What is the recommended method to get the tvdb id that is stored in the db for a certain episode, why can't I get this with VideoLibrary.GetEpisodeDetails, the Library.Fields.Episode doesn't have a value for the tvdb id or even for the imdb id that is available from VideoLibrary.GetTVShowDetails.
XBMC does not store a tvdb id per episode but only per tvshow so that's why you can't retrieve it on a per episode base.

othrayte Wrote:And is this page http://wiki.xbmc.org/index.php?title=JSON_RPC maintained by hand, because the Library.Fields.Episode section doesn't list the avaliable fields which for reference are [ "title", "plot", "votes", "rating", "writer", "firstaired", "playcount", "runtime", "director", "productioncode", "season", "episode", "originaltitle", "showtitle", "cast", "streamDetails", "lastplayed", "fanart", "thumbnail", "file" ].
No the current status of that page was autogenerated but as you can see it is far from perfect. Managing it by hand would be a too time-consuming task. Furthermore with some of my recent changes I broke my tool to auto-generate the wiki article so that's why there are no updates right now.

cinusek Wrote:In my utility I want XBMC to display any kind of media it supports. I am using the XBMC.Play method and pass it URL to the resource on the Internet.

It works fine with video files but not with images. The same images are displayed correctly when I use UPnP to control XBMC but I prefer json-rpc.

Is the Play method limited by design or is it a bug that I need to report?

To view images you should use the XBMC.StartSlideshow() command but that one currently only accepts a directory as a parameter. Please create a feature request ticket on trac and when I got the time I'll look into it and see in which command it will fit best.
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
Montellese Wrote:XBMC does not store a tvdb id per episode but only per tvshow so that's why you can't retrieve it on a per episode base.

Yes, but nether does it store the title of the show ('showtitle') for each episode, so it would already have to got to the tvshow to get that. Each episode has an entry for the associated tvshowid and as such is associated with a specific 'tvshow' and that is where the 'tvdbnumer' would come from.

I would just use GetTVShowDetails (ie pull the associated tvshow entry) for the episode except that the jsonrpc currently has no way (that i've found) of getting the tvshowid given the episodeid which i would need to pass to that method.

Thanks for your help and I understand now about the wiki, maybe it would be useful to have a link somewhere to the raw interface definition.
Image
Developer working on Trakt Utilties for XBMC (Download)
Please read Getting Support before asking for support.
Reply
othrayte Wrote:Yes, but nether does it store the title of the show ('showtitle') for each episode, so it would already have to got to the tvshow to get that. Each episode has an entry for the associated tvshowid and as such is associated with a specific 'tvshow' and that is where the 'tvdbnumer' would come from.

I would just use GetTVShowDetails (ie pull the associated tvshow entry) for the episode except that the jsonrpc currently has no way (that i've found) of getting the tvshowid given the episodeid which i would need to pass to that method.

I am working on providing the IDs for genre, sets, tvshows etc (depending on the object) in such calls so that would solve your problem.

othrayte Wrote:Thanks for your help and I understand now about the wiki, maybe it would be useful to have a link somewhere to the raw interface definition.

IMO the best you can do is either use the simple JSONRPC.Introspect call or if you use a very recent nightly build you could make even better use of it by using the newly introduced "filter" parameter which lets you view the json schema definition of a single method (which is much easier to read than the full introspect output).
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
Montellese Wrote:I am working on providing the IDs for genre, sets, tvshows etc (depending on the object) in such calls so that would solve your problem.

I had found that I can fall back to just the title ect for the moment, but I'll defiantly be looking out for this so that I can make own add-on properly robust. This does seem like the most logical way of doing it, it could become a nightmare if episode details had to support every thing from tvshow or genre.
Image
Developer working on Trakt Utilties for XBMC (Download)
Please read Getting Support before asking for support.
Reply
Could someone tell me which call will play a song from its songid. i.e. clear playlist and play the song.

XBMC.Play used to be able to do this but now cannot take a songid as a param.

I know this can be done with separate calls but I'd prefer to do it with one.
Reply
I was wondering if it was already possible to send multiple commands at once in one single json call?
it would be very helpful when you want for example to:
- clear the VideoPlaylist
- insert multiple items in it
-start playing
All at once (which would require the commands to be performed in the right order)

Thanks
Reply
carmenm Wrote:I was wondering if it was already possible to send multiple commands at once in one single json call?
it would be very helpful when you want for example to:
- clear the VideoPlaylist
- insert multiple items in it
-start playing
All at once (which would require the commands to be performed in the right order)

Thanks

check batch requests in json-rpc 2.0 spec (essentially array of requests), we support them in mainline. Not sure if we do in dharma though
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
It's not available for Dharma.
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
I am using the nightly builds, so it should it be available. right?

Thanks
Reply
Yeah it should. You should be able to send them in a single HTTP request or over TCP by putting all the jsonrpc requests in an array
Code:
[
{ "jsonrpc": "2.0", .... },
...
{ "jsonrpc": "2.0", .... }
]
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
Just tested it. It works like a charm!!!!

THANK YOU, you made my day
Reply
I just made a few commits to fix a few bugs and add new functionality. There are two new methods Export and Clean in AudioLibrary and VideoLibrary and ScanForContent has been renamed to Scan. Furthermore the "thumbnail" field is now always returned when it is requested even if it's empty.
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
I am trying to use XBMC.Play

I am using XBMC Git:20110623-b2c2053

This is my python command

Code:
{
    \"jsonrpc\": \"2.0\",
    \"method\": \"XBMC.Play\",
    \"params\": {
        \"file\": \"C:\\Users\\alex\\Videos\\myfilm.avi\",
        \"type\": \"video\"
    },
    \"id\": 1
}

Don't work.

Where is the error?

Bye


Pfeifer
Reply
  • 1
  • 69
  • 70
  • 71(current)
  • 72
  • 73
  • 226

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