skin.eminence.2
skin.eminence.2 copied to clipboard
Fix Episode Thumb
This pr fixes a bug. Thumbnails of unwatched episodes are always displayed, instead of fanart when the corresponding kodi option is selected. This seems to be a kodi bug but here is a fix.
Issue kodi: https://github.com/xbmc/xbmc/issues/21656.
ListItem.Thumb is depreciated (as you note in your bug report) so it shouldn't be used (it is an alias for ListItem.Icon here).
You can check that spoiler isn't being hidden before displaying thumb using this condition:
String.IsEqual(ListItem.DBType,episode) + !String.IsEmpty(ListItem.Art(thumb)) + !String.IsEqual(ListItem.Icon,ListItem.Art(fanart)) + !String.IsEqual(ListItem.Icon,OverlaySpoiler.png)
e.g.
<value condition="String.IsEqual(ListItem.DBType,episode) + !String.IsEmpty(ListItem.Art(thumb)) + !String.IsEqual(ListItem.Icon,ListItem.Art(fanart)) + !String.IsEqual(ListItem.Icon,OverlaySpoiler.png)">$INFO[ListItem.Art(thumb)]</value>
<value condition="String.IsEqual(ListItem.DBType,episode)">$INFO[ListItem.Icon]</value>
I modified the code. Currently it shows tvshow.fanart if available or black if not. It can be modified later to handle more cases.