Open up an addon from another addon.. - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: Open up an addon from another addon.. (/showthread.php?tid=216158) |
Open up an addon from another addon.. - aarronlee - 2015-01-25 Open up an addon from another addon.. I would like to launch another add-on like Youtube from my add-on... How is this done? RE: Open up an addon from another addon.. - Lunatixz - 2015-01-25 (2015-01-25, 01:19)aarronlee Wrote: Open up an addon from another addon.. Code: RunScript(script[,args]*) Code: def xbmc.executebuiltin ( function ) Use this: Code: xbmc.executebuiltin('XBMC.RunScript('ADDON_PATH + '/default.py)') RE: Open up an addon from another addon.. - enen92 - 2015-01-26 As an alternative to runscript you can also run RunAddon specifying the addon id: Code: xbmc.executebuiltin('XBMC.RunAddon(plugin.video.youtube)') RE: Open up an addon from another addon.. - User 191275 - 2015-01-26 If you'd like to open up a Youtube video, you should do the following: Code: xbmc.executebuiltin('PlayMedia(plugin://plugin.video.youtube/?action=play_video&videoid=SOME_VIDEO_ID)') If you just want to open an arbitrary page in the Youtube add-on, first figure out what that page's URL is, and then run: Code: xbmc.executebuiltin('RunPlugin(plugin://plugin.video.youtube/THE_REST_OF_THE_URL)') For a video plugin (like YouTube), the RunScript function is deprecated in Helix; don't use that. My understanding is that nowadays, RunScript is only for script add-ons (read: stuff that would show up in Programs). If you want to open the main page for the Youtube add-on, this should work: Code: xbmc.executebuiltin('RunAddon(plugin.video.youtube)') RE: Open up an addon from another addon.. - ironic_monkey - 2015-01-26 runscript is for non-addon scripts, snippets that is part of some addon but not its entry point, or for user-written scripts they cba to wrap up in an addon packaging. |