Plugin vs Script GUI Clarifciation
#1
Hi everyone. I've been attempting to build a Kodi addon for the first time over the past week or so and there's a couple of areas where I'm looking for some clarification/advice. I apologize in advance if I have some terminology wrong.

Most of the app's GUI could be handled by the pre-built windows/default skin within Kodi however a couple of them require a custom layout. I know that to use custom skins the addon has to be a script instead of a plugin. However, from reading through the wiki guides, forums and google search results it would seem that the use of the default skin is somewhat limited in a script addon due to the way the windows are initialized. Do I have that correct? For example, when I use MyVideoNav.xml and load it through .doModal(), the container's info labels are empty and the visibility conditions don't function properly. I assume that's due to the differences in the way the skin is loaded as opposed to in a plugin.

Now I guess what I'm wondering is what solutions are possible and which might be the best one.

1) Is there a way through xbmcgui.WindowXML to fully initialize the built-in windows and have the visibility conditions function properly?
2) Is there a way to switch between script and plugin functionality?
3) Am I better of if I just bite the bullet and do the entire thing in a custom skin?

Kinda thinking options #3 is the route I'll end up having to take but I figured I would look into it here first. Thanks!
Reply
#2
you're right in assuming 3 is the way to go.
1) is simply not possible
2) plugins are very limited as to what you can do with them. trying to switch from a plugin to a script will either not work or, at best, result in annoying issues.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
(2019-11-20, 02:24)ronie Wrote: you're right in assuming 3 is the way to go.
1) is simply not possible
2) plugins are very limited as to what you can do with them. trying to switch from a plugin to a script will either not work or, at best, result in annoying issues.

Thanks! Like I said, I figured I'd double check here before committing a bunch of time to it.
Reply
#4
I have a follow up question. When creating a addon specific skin, it appears that the Includes.xml for the active skin gets used. Is there a way to use an Includes.xml that is specific to the addon or at least set up the defaults? Or do you have to put everything inline in the window xml?
Reply
#5
nope, it's not possible to use add an includes.xml file to your addon.
you'll indeed have to code everything inside your window xml file.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#6
(2019-12-02, 12:13)ronie Wrote: nope, it's not possible to use add an includes.xml file to your addon.
you'll indeed have to code everything inside your window xml file.

Cool, thanks. I appreciate your assistance navigating through this process.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Plugin vs Script GUI Clarifciation00