Kodi Community Forum

Full Version: Addons ListItem.Art(fanart) Variable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
php:
<variable name="VarFanart">
   <value condition="!String.IsEmpty(ListItem.Art(fanart))">$INFO[ListItem.Art(fanart)]</value>
   <value>DefaultAddon.png</value>
</variable>

This is a simple variable fallback. It's working fine for videos and music content but not for addons.
Can someone confirm ?

The DefaultAddon.png value it's random. It's not working also with any other texture path.

Kodi 18.0 ALPHA 2 Git: 20180316

Cheers
Nessus
Known issue, it's been reported a few times, I'll have to look for the threads.

AFAIK, !String.IsEmpty always returns true for addon artwork, whether it exists or not. I'm just guessing this was overlooked way back when because addons in the Kodi repository are supposed to have icons and fanart, even though many of them don't.
Here's the thread I was thinking of, I don't think I ever reported this on Trac though...

https://forum.kodi.tv/showthread.php?tid=304932
Yes, you are right. I didn't notice this till now. But, further investigating this, i found out that if the addon has added the <assets/> tag to the addon.xml then both icon.png & fanart.jpg textures strings are empty or filled accordingly.

For example, check the Artist Slideshow and the Artwork Beef addons:
- The Artist Slideshow has no <assets/> tag set at all so both textures strings are filled but there is no fanart.jpg texture.
- The Artwork Beef has set the <assets/> tag only for the icon.png, so the String.IsEmpty(ListItem.Art(fanart)) it's working fine.

So, (once again!) it's the addons developers that they need to follow the skin engine guidlines if they want their content to be shown properly by the skinners.

Cheers
Nessus
Wasn't aware how <assets/> affected it, good to know!