skin.eminence.2 icon indicating copy to clipboard operation
skin.eminence.2 copied to clipboard

Fix Episode Thumb

Open cinqmilleans opened this issue 2 years ago • 2 comments

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.

cinqmilleans avatar Jul 10 '22 09:07 cinqmilleans

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>

jurialmunkey avatar Jul 10 '22 10:07 jurialmunkey

I modified the code. Currently it shows tvshow.fanart if available or black if not. It can be modified later to handle more cases.

cinqmilleans avatar Jul 10 '22 16:07 cinqmilleans