• 1
  • 71
  • 72
  • 73(current)
  • 74
  • 75
  • 226
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
Montellese Wrote:That is because you have to use the "videotitle" sort method and not the "title" sort method for videos.

Thanks for the clarification.
Reply
Are there any plans to provide a query option such as

Code:
{"id":7,"jsonrpc":"2.0","method":"VideoLibrary.GetMovies","params":{"fields":["title"],"query":{"method":"videotitle","contains":"transformers"}}}
Reply
thedroid Wrote:Are there any plans to provide a query option such as

Code:
{"id":7,"jsonrpc":"2.0","method":"VideoLibrary.GetMovies","params":{"fields":["title"],"query":{"method":"videotitle","contains":"transformers"}}}

Yeah, some form of "search" is planned, we aren't totally sure how to do it just yet though. A ticket for discussing it would be very nice, with good examples about how to achieve it.

Currently the database doesn't really have the hooks so we would need to implement that also afaik (not a problem just makes the problem larger), so if someone could create sql statements along with the examples that would also be very appreciated.

I must say I kindof like the query idea but we could probably do it more general. i.e. query": ["videotitle contains transformers"] the question is mostly how to handle the and/or stuffs 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
topfs2 Wrote:A ticket for discussing it would be very nice, with good examples about how to achieve it.

A similar ticket is currently in tracker already

[HTML][/HTML]execute SQL statements via JSON-RPC

Should I add to this or create a new ticket?
Reply
thedroid Wrote:A similar ticket is currently in tracker already

[HTML][/HTML]execute SQL statements via JSON-RPC

Should I add to this or create a new ticket?

Please open a new with just search (generally one per method), that one you linked to i almost want to close as its very unclear, i think its more about edit of items than general SQL statements.
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
topfs2 Wrote:Please open a new with just search

Created

http://trac.xbmc.org/ticket/11697
Reply
Hello,

I've just started looking at the JSON interface, I'm currently accessing it via HTTP, which is working great. There is currently one thing I'm looking for, is there a way to get the path of a TV Show with "VideoLibrary.GetTvShows"? I see for Episodes I can get the file, the same for Movies, hoping the same exists for GetTvShows.

I attempted to use, directory, path, folder, dir, to no avail.

Edit: I've been testing against both Dharma (my main setup) and the latest nightly from XBMC.org (20110703-36d20e9), if i pass the field "file" to Dharma, I get a response, without that field, If I pass the same field to the nightly I get an empty string back (progress!).
I also gave GetTvShowDetails a shot with the field "file", method not implemented on Dharma, but on the nightly I get a valid response with the file filled out.

Based on what I've uncovered now it seems I will need Bleeding Edge/Eden to support what I'm looking for, but I'm hoping to save the extra step of having to get the details for a TvShow, though that is less of a concern.

I'd appreciate any help with this.

Cheers,

Markus
XBMC-Livingroom:
Zotac IONITX-A|4GB RAM|20GB 2.5" HDD|Windows 7 Ulitmate|Video/Audio: HDMI to 1080P Samsung LNT4669
XBMC-Bedroom:
HP A1420N|1GB RAM|200GB HDD|Windows 7 Ultimate|Radeon 24000HD|Video: DVI to HDMI on Samsung 720P TV|Audio: Over Analog to TV
Reply
markus101 Wrote:Based on what I've uncovered now it seems I will need Bleeding Edge/Eden to support what I'm looking for, but I'm hoping to save the extra step of having to get the details for a TvShow, though that is less of a concern.

That was a bug and I just fixed it so it should be available in the nightly build of tomorrow. Thanks for letting us know.
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
markus101 Wrote:Hello,

I've just started looking at the JSON interface, I'm currently accessing it via HTTP, which is working great. There is currently one thing I'm looking for, is there a way to get the path of a TV Show with "VideoLibrary.GetTvShows"? I see for Episodes I can get the file, the same for Movies, hoping the same exists for GetTvShows.

I attempted to use, directory, path, folder, dir, to no avail.

Edit: I've been testing against both Dharma (my main setup) and the latest nightly from XBMC.org (20110703-36d20e9), if i pass the field "file" to Dharma, I get a response, without that field, If I pass the same field to the nightly I get an empty string back (progress!).
I also gave GetTvShowDetails a shot with the field "file", method not implemented on Dharma, but on the nightly I get a valid response with the file filled out.

Based on what I've uncovered now it seems I will need Bleeding Edge/Eden to support what I'm looking for, but I'm hoping to save the extra step of having to get the details for a TvShow, though that is less of a concern.

I'd appreciate any help with this.

Cheers,

Markus

Uhm sounds like nightly have a bug then. Tvshows and season cant have a directory coupled with them. Episodes of the same show can be spread out over many sources and directories. Same goes with albums and artists.
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
Montellese Wrote:That was a bug and I just fixed it so it should be available in the nightly build of tomorrow. Thanks for letting us know.

Thanks, I'll check it out.

topfs2 Wrote:Uhm sounds like nightly have a bug then. Tvshows and season cant have a directory coupled with them. Episodes of the same show can be spread out over many sources and directories. Same goes with albums and artists.
Hmm, I hadn't thought of that (WHS keeps everything in one place for me), thanks for the information.

-Markus
XBMC-Livingroom:
Zotac IONITX-A|4GB RAM|20GB 2.5" HDD|Windows 7 Ulitmate|Video/Audio: HDMI to 1080P Samsung LNT4669
XBMC-Bedroom:
HP A1420N|1GB RAM|200GB HDD|Windows 7 Ultimate|Radeon 24000HD|Video: DVI to HDMI on Samsung 720P TV|Audio: Over Analog to TV
Reply
I'm trying to send a on screen Notification on latest git build.
Is this the correct way to do it?

Code:
{"jsonrpc": "2.0", "method": "JSONRPC.NotifyAll", "params": {"sender": "wsuxbackup", "message": "test"}, "id": "1"}
{
        "id": "1",
        "jsonrpc": "2.0",
        "result": "OK"
}

it returns with OK and I see it in the debug log, but nothing appears on screen Confused

I tought I maybe have to set notification flag, but I cannot get it to work:
Code:
{"jsonrpc": "2.0", "method": "JSONRPC.SetNotificationFlags", "params": {"player": true, "gui": true, "system": true, "videolibrary": true, "other": true, "audiolibrary": true}, "id": "1"}
{
        "error": {
                "code": -32602,
                "data": {
                        "message": "Too many parameters",
                        "method": "JSONRPC.SetNotificationFlags"
                },
                "message": "Invalid params."
        },
        "id": "1",
        "jsonrpc": "2.0"
}
Reply
wsnipex Wrote:I'm trying to send a on screen Notification on latest git build.
Is this the correct way to do it?

Code:
{"jsonrpc": "2.0", "method": "JSONRPC.NotifyAll", "params": {"sender": "wsuxbackup", "message": "test"}, "id": "1"}
{
        "id": "1",
        "jsonrpc": "2.0",
        "result": "OK"
}

it returns with OK and I see it in the debug log, but nothing appears on screen Confused

I tought I maybe have to set notification flag, but I cannot get it to work:
Code:
{"jsonrpc": "2.0", "method": "JSONRPC.SetNotificationFlags", "params": {"player": true, "gui": true, "system": true, "videolibrary": true, "other": true, "audiolibrary": true}, "id": "1"}
{
        "error": {
                "code": -32602,
                "data": {
                        "message": "Too many parameters",
                        "method": "JSONRPC.SetNotificationFlags"
                },
                "message": "Invalid params."
        },
        "id": "1",
        "jsonrpc": "2.0"
}

Its not a GUI notification like the Kai Toast. The notifyAll does a jsonrpc notification to other json-rpc clients.
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
ahh, I see. thanks for the clarification.
is there way to send a GUI notification via json-rpc?
Reply
There seems to be added code that slows down the call Files.GetDirectory when using a media type. For instance the following call:
Code:
{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "/media/hte_files/Trailers", "media": "video"}, "id": 1}
takes less than a second to complete on Dharma, but 8-10 seconds on pre-Eden(git: 4ff2ea - though shows up on much earlier versions too), the folder contains about 430 video files(trailers) and about 200 non-video files.

In the log I see:
Code:
10:41:30 T:2946804592 M:2621538304   DEBUG: GetMovieId (/media/hte_files/Trailers/127 Hours-trailer.mov), query = select idMovie from movie where idFile=3864
10:41:30 T:2946804592 M:2621538304   DEBUG: GetEpisodeId (/media/hte_files/Trailers/127 Hours-trailer.mov), query = select idEpisode from episode where idFile=3864
10:41:30 T:2946804592 M:2621538304   DEBUG: GetMusicVideoId (/media/hte_files/Trailers/127 Hours-trailer.mov), query = select idMVideo from musicvideo where idFile=3864
when the media type is specified, but not when nothing is specified(defaults to files)

Is there a way to disable this check of the database, since it is not really necessary(in this case), just trying to retrieve video(or music) that is not part of my library, which may be on a vfs in XBMC(it's for the python script Cinema Experience, btw)

If it is not, I'll add code to the script to query for files and sort the files with video extentions(or music extentions) out(though I think XBMC is a little faster, I know probably just milliseconds, but still Smile )
Reply
It could probably be sped up for videos at least, as there's no point doing those calls if content is set on the folder for instance (compare CGUIWindowVideoNav::RetrieveVideoInfo())
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
Reply
  • 1
  • 71
  • 72
  • 73(current)
  • 74
  • 75
  • 226

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