Kodi Community Forum

Full Version: [HELP] Weather conditional backdrop with background="true"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So after a little work I got background loading all set on my mod, but the weather fanart conditional is not working. This is the coding I am using in home.xml

Code:
<item id="6">
<label>Weather</label>
<onclick>ActivateWindow(Weather)</onclick>
<icon>special://skin/backgrounds/weather.jpg</icon>
<thumb>$INFO[Skin.String(Home_Custom_Back_Weather_Folder)]$INFO[Weather.FanartCode]</thumb>
</item>

The thumb path is exactly the same as I did before with image path. The fanart does the work after it the folder is set, but my problem comes from not getting the default weather.jpg picture upn the initial loading of the skin. I imagine I am making some code error with the thumb tag. Andy advice would be much appreciated.
There's nothing wrong with your code.
The default weather icon will only be shown if the thumb string returns empty.
But since Weather.FanartCode will always return a value, the thumb string is never empty.
So in order to get the default image I will need to create a weather conditions visible and then make two weather buttons.

One with a visible for weatherconditions and the other visible would be something like !weatherconditions and that would also not include the weather fanart coding?
yes, conditional weather backgrounds should be disabled by default, create a skin setting to enable it.
i'm using something like this in Transparency! :

Code:
<item id="10">
    <label>8</label>
    <onclick>ActivateWindow(Weather)</onclick>
    <icon>special://skin/media/backgrounds/weather.jpg</icon>
    <thumb>$INFO[Skin.String(Home_Custom_Background_Weather_Folder)]</thumb>
    <visible>!Skin.HasSetting(Home_Weather_Conditional_Backgrounds)</visible>
</item>
<item id="10">
    <label>8</label>
    <onclick>ActivateWindow(Weather)</onclick>
    <icon>special://skin/media/backgrounds/weather.jpg</icon>
    <thumb>$INFO[Skin.String(Home_Conditional_Weather_Folder)]$INFO[Weather.FanartCode]</thumb>
    <visible>Skin.HasSetting(Home_Weather_Conditional_Backgrounds)</visible>
</item>