RunPugin RunAddon RunScript
#1
I guess I don't understand the difference between these and when you should use one or the other. I tried to look through AddonBuiltins.cpp to see what is going on, and from that it seems like RunAddon is maybe a little bit more powerful version of RunPlugin (will activate a window depending on add-on extension point I think else defaults to RunPlugin behavior), but RunScript seems a bit different though I don't understand what the effect of the difference is, except that it does seem like RunScript will allow running of a random .py file that hasn't been "installed" but that isn't preferred. Any help?

scott s.
.
Reply
#2
In easy words, RunAddon() will basically automatically call either RunPlugin() or RunScript() based on the addon extension point. Plugins basically provide content for the kodi media windows, scripts often ship their own XML windows.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#3
(2015-10-27, 08:46)phil65 Wrote: In easy words, RunAddon() will basically automatically call either RunPlugin() or RunScript() based on the addon extension point. Plugins basically provide content for the kodi media windows, scripts often ship their own XML windows.

Thanks. I get the difference between the service provided by a plugin vs a script, but it doesn't seem to matter how they get invoked. Or does it? Sometimes in logs I see warnings about protocol plugin:// but don't see that any functionality is affected by the warning.

scott s.
.
Reply
#4
Update: So I did some digging around. What I find seems to be that if the skin calls RunPlugin() and the plugin is not installed, CAddonInstaller gets called with InstallModal() with promptForInstall. This raises a diaogYesNo asking user if they want to install the addon. This seems like a useful behavior, but is this intended?

This is prompted by a skin I am maintaining and had a dependency set for an addon that got removed from Kodi repo and this resulted in the skin being marked incompatible. So I was looking at alternatives that would get the addons installed but not prevent the skin from installing. By accident I came across this in a different skin. I see also the option of the "optional" parameter in the addon.xml. Maybe this is intended to do the same thing?

scott s.
.
Reply
#5
The 'optional' parameter does nothing.
Reply
#6
(2015-10-28, 00:52)Hitcher Wrote: The 'optional' parameter does nothing.

Must be why I've never seen an example of it being used. thanks

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
RunPugin RunAddon RunScript0