Open specific addon window. - 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: Open specific addon window. (/showthread.php?tid=169061) Pages:
1
2
|
Open specific addon window. - sogopot - 2013-07-14 I'm new to this json mumbo jumbo, so please excuse my ignorance. I was hoping someone can help with a solution for opening the Youtube addon, and have it specifically go directly in the My Subscription window. I used to be able to do this with the old webserver builtinfunctions commands. Now, not so sure how to with json. I'm able to use EventGhost, with the XBMC Repeat addon, and add a jsonrpc macro to activatewindow, with the following: ["plugin.video.youtube.beta"] but that just opens the Youtube addon, and I can't figure out the proper syntax to have go directly into the addon window for My Subscriptions. I added the My Subscriptions window to my favorites menu, and I posted the xml entry below: Code: <favourite name="My Subscriptions" thumb="C:\Users\intelpc\AppData\Roaming\XBMC\addons\plugin.video.youtube\thumbnails\subscriptions.png">ActivateWindow(10025,"plugin://plugin.video.youtube.beta/?folder=true&login=true&path=%2froot%2fsubscriptions&user_feed=subscriptions")</favourite> If anyone has a solution, please post it up. Thanks much, in advance! RE: Open specific addon window. - djdark - 2014-01-08 Also looking for the solution to this... I'm trying to run a json code in my irule remote for XBMC to open SportsDevil plugin and start off at the Live Sports Section... so far, I can get the plugin to load with the following: { "jsonrpc": "2.0", "method": "Addons.ExecuteAddon", "params": { "addonid": "plugin.video.SportsDevil"}, "id": 1 } which looks like this when encoded.. http://192.168.0.104:8080/jsonrpc?request=%7B%20%22jsonrpc%22%3A%20%222.0%22%2C%20%22method%22%3A%20%22Addons.ExecuteAddon%22%2C%20%22params%22%3A%20%7B%20%22addonid%22%3A%20%22plugin.video.SportsDevil%22%7D%2C%20%20%22id%22%3A%201%20%7D%20 I'm not sure if there is a parameter, path or directory to go right into the Live Sports section... any help? RE: Open specific addon window. - ncarthy - 2014-01-09 Not sure it would work but have you looked at the GUI.ActivateWindow method? See http://forum.xbmc.org/showthread.php?pid=1218875 for some examples RE: Open specific addon window. - djdark - 2014-01-09 I haven't yet, thanks, I'll look into it RE: Open specific addon window. - Bstrdsmkr - 2014-01-12 Keep in mind that Sports Devil isn't supported here, and therefore shouldn't be discussed here. For your problem, you're missing the parameters to be passed to the addon to trigger a certain view. Enable debug logging in Xbmc and launch the target addon and navigate to the desired window. Then grab your Xbmc.log and start reading. You're looking for something like plugin://my.video.plugin?mode=25&key=value&this=that Your json above is already passing in the addon I'd, you just need to get the part after the question mark. With that in hand, add another dict to your json called params at the Same level as addonid. It's value should be the key/value pairs found after the question mark RE: Open specific addon window. - djdark - 2014-01-14 Thanks for the reply. I've been playing around with this for a while (currently with ustvnow app which I think is supported here) to start in the Live section. I got the debug log and found the mode when selecting the Live section; plugin://plugin.video.ustvnow/?mode=live I've tried the following json codes without any luck... { "jsonrpc": "2.0", "method": "Addons.ExecuteAddon", "params": { "addonid": "plugin.video.ustvnow", "params": { "mode": "live" } }, "id": 2 } { "jsonrpc": "2.0", "method": "Addons.ExecuteAddon", "params": { "wait": false, "addonid": "plugin.video.ustvnow", "params": { "mode": "live", "id": "1"} }, "id": 2 } I've also tried a few others, what am I missing here? The following is the debug section of when I select the Live in the plugin Code: 18:40:23 T:2953924608 DEBUG: ustvnow: adding dir: Live - plugin://plugin.video.ustvnow/?mode=live RE: Open specific addon window. - Bstrdsmkr - 2014-01-16 I believe this is the correct format: Code: {"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"plugin.video.ustvnow", "params":{"mode":"live"}},"id":"1"}} RE: Open specific addon window. - giftie - 2014-01-16 The params need to be "?mode=live" or with out the question mark RE: Open specific addon window. - orppeled - 2014-10-05 Hey all, This topic seems like a good fit for what I'm trying to accomplish- is there a better way for interacting with addons using JSON-RPC? I'm talking about content addons such as Youtube, Netflix, Hulu. I'm trying to implement a web interface that'll communicate with XBMC for searching, playing, etc. on Youtube for example. Before you ask why would I want that, let me explain- It's a part of a web interface that solely relies on XBMC for communication, and will eventually act as the only XBMC interface. This means I won't have to use the normal GUI, and could only rely on the web interface using JSON-RPC. Going for the obvious, which is communicating with the Youtube API directly and only playing using plugin:// won't be a good solution, since then I'll have to interact with every plugin API I want to display on the web interface, and that's just alot of work. I've tried opening a plugin (ExecuteAddon), and interacting with it using Files.GetDirectory, and finally using Player.Open to play. Is this the best way to handle this? Thanks, Or RE: Open specific addon window. - Montellese - 2014-10-06 Files.GetDirectory should allow you to retrieve items from any plugin like you do when browsing it in the GUI. Not sure if you need ExecuteAddon for plugins. RE: Open specific addon window. - orppeled - 2014-10-17 Thanks so much for this @Montellese! I'm using Files.GetDirectory as you suggested. Now the problem is, that when I navigate to the search on Youtube, It's blocking and shows the search modal on XBMC, and I can't input through the Web-Interface, only from the GUI itself. Is there a better way to do this? Thanks a mil, Or RE: Open specific addon window. - Montellese - 2014-10-18 You can use JSON-RPC to provide an input for the on screen keyboard using Input.SendText. Apart from that there's not much you can do as every addon provides its own search functionality etc. RE: Open specific addon window. - orppeled - 2014-10-18 I really do appreciate it. Thanks. I can't really execute Input.SendText because XBMC is waiting for text, and is blocking (doesn't go to the next py command). Allow me to paste what I mean: getsearchbar = xbmc.Files.GetDirectory(directory=directory, media=media) ----> stays here and waits for me to input the text getsearchbar = xbmc.Input.SendText(text=u'gopro') return xbmc.Input.Select() I hope I'm making sense here. For the last time - I really do appreciate it. Regards, Or RE: Open specific addon window. - victmo - 2014-10-18 I followed ncarth's suggestion and I was able to open a specific addon window like this: Code: { Cheers RE: Open specific addon window. - orppeled - 2014-10-18 Thanks for this @victmo! I've tried both: Code: { And: Code: {"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory":"plugin://plugin.video.youtube/?path=/root/search/new&feed=search&login=false&", "media":"files"}, "id": 1} They both unfortunately block the UI, waiting for the user to type in a search term, while I myself would like to populate it. Any thoughts? Thanks, Or |