18 Nov 2019- TVDB are still in the process of fixing a number of bugs that have broken the TVDB scraper and any add-on that relies on TVDB data. TVDB are still working to rectify the problems.

Skinning Scripts/Addons Questions
#1
Been diving into doing some heavy customization without the the use of modules (like pyxbmct, etc) but hit a few roadblocks so wanted to check on a few things.

What doesn't work in scripts/addons when it comes to XMLs, that does in Skins? Examples below specifically that I am looking at:
1. Variables and Constants? If so, am I overlooking an obvious difference?
2. Includes (file and name)? If so, am I overlooking an obvious difference?
3. RunScript()? (Haven't tried just yet)
4. Params

Also, is there a way to pull the image used in an image control from the script invoking the XML directly using XBMC functions, members, or attributes?

Here is why I am asking the probably already beat to death questions I couldn't find an answer to.... Working on generating the custom windows for the script, but want to allow the use of 3rd party artwork modules to pull the artwork/skins information from dynamically. The code part I have already achieved more or less, aside from the fact if a fork is done then all artwork has to be under the same folder names and can have only one set per fork. I suppose that will work, but wanted to allow multiple artwork themes per fork of the artwork module. 

I suppose ultimately I could limit it to single set of images, and work with color theming instead but then I still fall into the issues where variables and constants seem to not work in the script.

Any feedback would be greatly appreciated on this area of work since it is new to me.
Reply
#2
This would be better in the skins development section - I'll move it there.
|Banned add-ons (wiki) Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

My Blog Posts
Reply
#3
(2019-07-21, 10:15)DarrenHill Wrote: This would be better in the skins development section - I'll move it there.

Ty
Reply
#4
Ok, so, found a solution for most anything I want to set dynamically that has not been working in addon skins. (For example, also found using textColor in the setLabel() for a label control does not work right).

Storing colors in an xml like a Skin Addon does, I can pull and set them like so using window properties:

In the XML:

            <control type="label" id="1">
                <left>4</left>
                <top>25</top>
                <width>908</width>
                <height>40</height>
                <textcolor>$INFO[Window().Property(dhtext)]</textcolor>
                <textoffsetx>15</textoffsetx>
                <align>center</align>
            </control>

In the Python:

class OK_Dialog(xbmcgui.WindowXMLDialog):
    # until now we have a blank window, the onInit function will parse your xml file
    def onInit(self):
        self.colors = themecontrol.ThemeColors()
        self.title = 1
        self.body = 2
        self.getControl(self.title).setLabel('Header Test')
        self.setProperty('dhtext', self.colors.dh_color)
        self.getControl(self.body).setText('Body Test.')
        xbmc.sleep(100)
        # this puts the focus on the top item of the container
        self.setFocusId(self.getCurrentContainerId())
        xbmc.executebuiltin("Dialog.Close(busydialog)")
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Skinning Scripts/Addons Questions00