Kodi Community Forum

Full Version: Addons missing icon.png not being checked for by kodi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Addons with missing icon.png, kodi still passes the filename as if it was there.
This means you can't check for empty string or use fall back.
You can test by selecting a number of the addons included with kodi as default!

Using latest RC Krypton.
still true,,..
I encountered this today. Extremely frustrating!

You can check for empty string though with Control.GetLabel
Give the image control an id (say 9922) and then have another image control with your fallback image and this condition
Code:
String.IsEmpty(Control.GetLabel(9922))

e.g.

Code:
<control type="image" id="9922">
  <texture>$INFO[ListItem.Icon]</
</control>

<control type="image">
  <texture>My_Fallback_Image.png</texture>
  <visible>String.IsEmpty(Control.GetLabel(9922))</visible>
</control>

This is how I got around this in AddonBrowser.xml

The same trick is good for getting locally stored season poster art at the episode level.
This bug has been there for a long time.

Are you using a $VAR for your texture? I've found that if I just add another control and make the texture ListItem.Icon, it will correctly display the default icon when no icon is available.

Code:
<!-- Hack for addons with no icons -->
<control type="image">
           <visible>Container.Content(addons)</visible>
           <top>10</top>
           <left>10</left>
           <width>100</width>
           <height>100</height>
           <aspectratio align="center" aligny="center">scale</aspectratio>
           <texture background="true">$INFO[ListItem.Icon]</texture>
</control>
Yeah, thanks both. Glad it isn't just me!! Big Grin Seems the devs need to follow their own submission rules, as most of the missing icons are in the kodi install scripts *cof* Wink