• 1
  • 205
  • 206
  • 207(current)
  • 208
  • 209
  • 226
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
Hello All...noob to the topic of discussion. Tried a thread search and wasn't coming up with anything conclusive. Hoping to get a quick link posting or clarification.

Been experimenting via PUTTY to test commands. Attempting to directly access Movie listings or Television listings (rather than the "videos" directory).

XBMC Wiki's page on window ID's gives a hint, stating to use something like the following...
ActivateWindow(Videos,MovieTitles)

I've tried structuring my command in the following variants, with no luck...

jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videos","movietitles"},"id":"1"}}

jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videos,movietitles"},"id":"1"}}

jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videos","movies"},"id":"1"}}

...all fail with an "invalid params" message, because the second passed value doesn't match any defined enum value.

"videos" alone works fine...what am I doing wrong or missing?

Thanks for any thread leads or answers that can be provided.
Reply
(2014-02-16, 21:52)dingerjunkie Wrote: Hello All...noob to the topic of discussion. Tried a thread search and wasn't coming up with anything conclusive. Hoping to get a quick link posting or clarification.

Been experimenting via PUTTY to test commands. Attempting to directly access Movie listings or Television listings (rather than the "videos" directory).

XBMC Wiki's page on window ID's gives a hint, stating to use something like the following...
ActivateWindow(Videos,MovieTitles)

I've tried structuring my command in the following variants, with no luck...

jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videos","movietitles"},"id":"1"}}

jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videos,movietitles"},"id":"1"}}

jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videos","movies"},"id":"1"}}

...all fail with an "invalid params" message, because the second passed value doesn't match any defined enum value.

"videos" alone works fine...what am I doing wrong or missing?

Thanks for any thread leads or answers that can be provided.
Please don't cross-post. It will lead to people ignoring you instead of giving you an answer.
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
(2014-02-16, 17:13)Montellese Wrote:
(2014-02-13, 14:58)jez500 Wrote: 1. Closing osd dialogs - now and again I may trigger something with the api that causes a dialog to open on screen, most common is "Failed playback" due to a library entry with a path to a invalid file, but also input dialogs (eg. search). When these are open, I seems to prevent any other api calls getting through and I need to go over to the host running xbmc and physically click the close button. So my question basically is, does anyone know of ways to avoid this? eg. allow the api to still do calls while a dialog is open, with search boxes I can send text with Input.SendText and it closes them but, error dialogs seem to kill at least, most commands.
That's a known issue. Ideally most JSON-RPC actions would not trigger any GUI dialogs at all. Furthermore JSON-RPC should still be usable while dialogs are open but at least all Player methods don't work anymore. Have you tried using Input.ExecuteAction with the "back" action?

This is the same as : http://forum.xbmc.org/showthread.php?tid...pid1624198

JSON Rpc on some dialogs does no more answer, and in rare case like pin code EventServer does not answer too.
Reply
Hi there,
How can i set a TvShow like watched or unwatched ?

{"jsonrpc":"2.0","method":"VideoLibrary.SetTVShowDetails","params":{"tvshowid":id,"playcount":value},"id":1}[/code]
Seems that if i use the code above with value = 0 or value = number of episodes , nothing happens. I have to set each episode playcount ?
Thanks in advance.
Clayton[/quote]
Reply
This is currently not supported as for seasons Sad

You need to update each episodes Sad
Reply
Oh, thank you Tolriq, i will do that. Seems a lot of job for a app side when the TvShow has hundreds of episodes, maybe i will just insert this on a add-on.
Thank again.
Clayton
Reply
Hi, tried to set all all episodes from a TvShow like watched, 11 episodes. Work´s fine, i set one by one, but after set all the episodes i did another request using "VideoLibrary.GetTVShowDetails" just to be sure that everything was fine, for my surprise the GetTVShowDetails return the field watchedepisodes like 0, i tested this many times. I am doing something wrong ? i will really have to use VideoLibrary.GetTVShows to get the new playcount state of my TvShow ?
Thanks
Regards
Clayton
Reply
Hi, what operators can i use with the field "playcount" on a Filter ?
Thanks
Clayton
Reply
(2014-02-18, 11:26)claymic Wrote: Hi, what operators can i use with the field "playcount" on a Filter ?
Thanks
Clayton

IIRC "is", "isnot", "greaterthan", "lessthan". Not sure about "between".
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
(2014-02-18, 13:40)Montellese Wrote:
(2014-02-18, 11:26)claymic Wrote: Hi, what operators can i use with the field "playcount" on a Filter ?
Thanks
Clayton

IIRC "is", "isnot", "greaterthan", "lessthan". Not sure about "between".
Thanks Montelesse, on my code is only working for "is", i am doing something wrong, i will check it.
Can you tell me what operators i can use for "videoresolution" ? What exactly i have to search on this field ? I am trying to filter some resolution using "contains", to check if the video contain or not a width like 1920, 1280, so on...
Thanks in advance
Best regards
Clayton
Reply
TBH I don't know about all the available fields either. JSON-RPC simply exposes all that are there.
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
(2014-02-19, 14:18)Montellese Wrote: TBH I don't know about all the available fields either. JSON-RPC simply exposes all that are there.
I tried to found some info about this and can´t found it, Is there a place where i can read about it ? I tried to use videoresolution contain 1920, don´t work, return all movies, "startswith" don´t work too, return all movies again.
Thanks for your help.
Clayton
Reply
Seem that i was walking on the wrong path Smile
The "videoresolution" is not the resolution of the video(1920x1040, 1920x1080,1280x540) of the movie, it´s 1080,720,480,so on... So i just need to use the operator "is".
Regards
Clayton
Reply
If a VideoLibrary.Clean is initiated using JSON, the GUI in recent Gotham nightlies now prompts to keep or remove missing items. Obviously this is undesirable when the clean has been initiated remotely via JSON and there is no user present to click the GUI button... is there any way to suppress the GUI prompts and always assume "remove" or "keep"? Maybe pass remove/keep/ask as a parameter on the JSON *.Clean request, with the default value being "remove" so as to remain consistent with the old pre-Gotham behaviour?

Otherwise VideoLibrary.Clean (and presumably AudioLibrary.Clean) are now a whole lot less useful (ie. almost unusable) from a JSON perspective if they require user intervention.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
(2014-02-24, 07:40)MilhouseVH Wrote: If a VideoLibrary.Clean is initiated using JSON, the GUI in recent Gotham nightlies now prompts to keep or remove missing items. Obviously this is undesirable when the clean has been initiated remotely via JSON and there is no user present to click the GUI button... is there any way to suppress the GUI prompts and always assume "remove" or "keep"? Maybe pass remove/keep/ask as a parameter on the JSON *.Clean request, with the default value being "remove" so as to remain consistent with the old pre-Gotham behaviour?

Otherwise VideoLibrary.Clean (and presumably AudioLibrary.Clean) are now a whole lot less useful (ie. almost unusable) from a JSON perspective if they require user intervention.

Thanks for the report. I'll see what I can get into Gotham. Most likely we will have to hard-code it to do a "keep" action as that's what makes most sense. Yes it differs from the previous behaviour but the previous behaviour was crazy. It's not acceptable to remove all items from a source just because the NAS is offline.

AudioLibrary.Clean is not affected as I've only adjusted the videolibrary cleaning to handle whole sources being offline.
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
  • 205
  • 206
  • 207(current)
  • 208
  • 209
  • 226

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