Skin/Python addon interaction
#1
Hi All,

I am having trouble working out how to add the following functionality.

I have an addon (VideoExtras) that I want to be able (with a skin modification) to allow each Movie to be flagged (maybe an image overlay) if it has extras available for it.

The python addon can be changed or added to (that's not the problem), and it knows which Movies have extras.

The problem is how can it provide that information to ViewsFileMode.xml to that it can work out if a given ListItem has an extra (i.e. it wants to be able to toggle <visible></visible> based of some setting that the VideoExtras script will set).

I have tried several things, none of which have worked. My previous thinking in this post:

http://forum.xbmc.org/showthread.php?tid=189894
http://forum.xbmc.org/showthread.php?tid...pid1659889

Is there some way that on load I can pass the entire ListItem set to my script and set an extra property?

Any ideas of ANY way that this can be achieved?

Thanks

Rob
Reply
#2
The addon provides what you need already -

8.3 Note To Skinners (Optional Feature)
If you wish to add an overlay or flag against TV Shows or Movies so that you can see if a given selection has any Extras without going into the Information Dialog, then a call can be made to:

Code:
<onload condition="System.HasAddon(script.videoextras)">XBMC.RunScript(script.videoextras,hasExtras,flag,"$INFO[ListItem.FilenameAndPath]")</onload>
This will result in the current window (or dialog) getting a property set on it with the name matching "flag" with the value set to "true" if there are extras for the given FilenameAndPath. (No flag will be set if there are no extras)

http://wiki.xbmc.org/index.php?title=Add...Feature.29
Reply
#3
Hi Hitcher,

Yes, I wrote that - it doesn't work Sad

Do you have any suggestions?

Thanks

Rob
Reply
#4
i don't think it's possible.

at best, you might be able to display an indicator for the focused listitem only, but that's about it.
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
#5
Hi All,

Eventually managed to find a way to provide what I wanted. It's not nice, but it does just about work.

The addon (VideoExtras) now has a service on login that will check all the videos via the JSON interface. Then if it has any extras will create a small image file using the name of the DBID (i.e. 34.png) in the addon data section.

Then the skin does something like:

Code:
<control type="image">
    <posx>950</posx>
    <posy>14</posy>
    <width>16</width>
    <height>16</height>
    <texture fallback="blank.png">$INFO[ListItem.DBID,special://profile/addon_data/script.videoextras/movies/,.png]</texture>
    <visible>System.HasAddon(script.videoextras) + Window.IsVisible(Videos) + Container.Content(Movies)</visible>
</control>

In order to display the icon for each video.

http://wiki.xbmc.org/index.php?title=Add...rs_Only.29

Just in case some-one else stumbles accross this post trying to do the same thing!

Rob
Reply

Logout Mark Read Team Forum Stats Members Help
Skin/Python addon interaction0