Open up an addon from another addon..
#1
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?
Reply
#2
(2015-01-25, 01:19)aarronlee Wrote: 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?

Code:
RunScript(script[,args]*)
Code:
def xbmc.executebuiltin    (         function    )    
executebuiltin(function)--Execute a built in XBMC function.
function : string - builtin function to execute.
List of functions - http://wiki.xbmc.org/?title=List_of_Built_In_Functions
example:
- xbmc.executebuiltin('XBMC.RunXBE(c:\avalaunch.xbe)')

Use this:
Code:
xbmc.executebuiltin('XBMC.RunScript('ADDON_PATH + '/default.py)')
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#3
As an alternative to runscript you can also run RunAddon specifying the addon id:

Code:
xbmc.executebuiltin('XBMC.RunAddon(plugin.video.youtube)')
Reply
#4
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)')
Reply
#5
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.
Reply

Logout Mark Read Team Forum Stats Members Help
Open up an addon from another addon..0