joshualyon / ST-Kodi

Kodi for SmartThings - Device Type and SmartApp
Apache License 2.0
12 stars 12 forks source link

Add `ExecuteAddon` #4

Closed joshualyon closed 8 years ago

joshualyon commented 8 years ago

http://kodi.wiki/view/JSON-RPC_API/v6#Addons.ExecuteAddon

"jsonrpc": "2.0","method": "Addons.ExecuteAddon","params": {"wait": false,"addonid": "USERVARIABLE","id": 2} 

There is an optional sub params that can be used to pass parameters to an addon. For now, we'll just implement the base capability to execute an addon as most plugins that support parameters can be called with Player.Open (reference):

{"id":1,"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"file":"plugin:\/\/plugin.video.youtube\/?path=\/root\/search&action=play_video&videoid=17upC495LMg"}}}
joshualyon commented 8 years ago

Added in 41de067

executeAddon(addonid)

For example: executeAddon("script.globalsearch")