v18 Unexpected behaviour: Images are "refreshing" when Widget Containers are refreshing
#1
I have detected an issue that is driving me a little crazy.

I am modifying the skin estuary (Kodi v18.5), adapting it to my needs.
In the HOME window in the lower part I have some widgets that filter the TvShows by categories, and in the upper part (like Netflix style), I have the TvShow logo (clearlogo), plot, Studio logo, etc...
In the background the trailer of the focused TvShow is played.

Issue:
When the trailer ends, the widgets are updated (I know this is normal Kodi behaviour), the problem is that all the images (fanart, clearlogo, Studio logo) that are in the HOME window are “refreshed” too (except the TvShow posters of the widgets).
I have tried to assign the value to the <texture> of these images in different ways, via variable, via $INFO[Container.ListItem.Art(clearlogo)], via window property setted from the skin, via window property setted from a python script... the same thing always happens, when the trailer ends and the Containers are updated, the images disappear for a while and then reappear.

The only way I have found that this doesn’t happen is to manually enter the image path, for example:
xml:
<texture background = "true"> special: //skin/Clearlogo.png </texture>

In this case, when the video ends, the image is maintained and not “refreshed”. But obviously this option is not functional, since when selecting another tvShow, the image doesn’t change, it is static.

Does anyone know what happens? Please can you help me?

The expected behaviour is that the images in the HOME window don't update or refresh when the background video ends or when the Containers are refreshing/updating.
Reply
#2
Hard to say without seeing your code...
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#3
Here are parts of the code:

On Includes.xml:
xml:
    <include name="DefaultBackground">
        <definition>

        <control type="videowindow">
            <depth>DepthBackground</depth>
            <left>40%</left>
            <top>0</top>
            <width>60%</width>
            <height>60%</height>
        </control>

        ....            
            
        <!--CLEARLOGO-->
        <control type="image" id="60001">
            <left>132</left>
            <top>20</top>
            <width>480</width>
            <height>186</height>
            <align>left</align>
            <aspectratio align="left" aligny="center">keep</aspectratio>
            <fadetime>600</fadetime>
            <animation effect="zoom" center="auto" end="102,102" time="0" condition="Integer.IsGreater(System.StereoscopicMode,0)">conditional</animation>
            <animation effect="fade" start="0" end="100" time="400">WindowOpen</animation>
            <animation effect="fade" start="100" end="0" time="300">WindowClose</animation>
            <animation effect="fade" time="400">VisibleChange</animation>
            <texture background="true">$INFO[window(home).Property(clearlogoR)]</texture>
        </control>
        
        ....

On Includes_Home.xml: (The focused layout of the containers)
xml:
    <focusedlayout width="232" height="370">
        <control type="group">
            <depth>DepthContentPopout</depth>
            <left>0</left>
            <top>0</top>
    
            <include content="InfoWallMovieLayoutR">
                <param name="focused" value="true" />
            </include>

            <control type="button" id="$PARAM[list_id]910">
                <left>0</left>
                <top>0</top>
                <width>0</width>
                <height>0</height>
                <texturefocus>-</texturefocus>
                <texturenofocus>-</texturenofocus>
                            
                ....
                            
                <onfocus condition="!String.IsEqual(window(home).Property(ElementoActual),ListItem.DBID)">CancelAlarm(PlayTrailer,true)</onfocus>
                <onfocus condition="!String.IsEqual(window(home).Property(ElementoActual),ListItem.DBID)">Playlist.Clear</onfocus>
                <onfocus condition="!String.IsEqual(window(home).Property(ElementoActual),ListItem.DBID)">SetProperty(clearlogoR,$INFO[Container.ListItem.Art(clearlogo)],home)</onfocus>
                <onfocus condition="!String.IsEqual(window(home).Property(ElementoActual),ListItem.DBID)">AlarmClock(PlayTrailer,RunScript(script.R.Trailer),00:04,silent)</onfocus>
                <onfocus condition="!String.IsEqual(window(home).Property(ElementoActual),ListItem.DBID)">SetProperty(ElementoActual,$INFO[ListItem.DBID],home)</onfocus>
                            
                ....
                            
            </control>
        </control>
    </focusedlayout>

script.R.Trailer, addon.py:
python:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import xbmc
import xbmcaddon
import xbmcgui
import xbmcvfs

ruta=""
file=""

ruta = xbmc.getInfoLabel("ListItem.Path")
file = ruta + "Videos/VideoBackground.mp4"

if xbmcvfs.exists(file) == True:
    xbmcgui.Window(10000).setProperty('PlayingTrailerR', "true")
    xbmc.Player().play(file,windowed=True)
else:
    file = ruta + "Videos/VideoBackground.mkv"
    if xbmcvfs.exists(file) == True:
        xbmcgui.Window(10000).setProperty('PlayingTrailerR', "true")
        xbmc.Player().play(file,windowed=True)

If you need something more you just have to say it.
Reply

Logout Mark Read Team Forum Stats Members Help
Unexpected behaviour: Images are "refreshing" when Widget Containers are refreshing0