2024-04-11, 14:28
(2024-04-11, 04:59)whisperer Wrote: After testing it, I noticed that some icons are not displayed.
As I'm not familiar in Kodi skin development, I'm unsure about the cause of this issue. I have attached two comparison screenshots for reference.
I revisited the code changes and simplified the changes. One added <visible> clause and one removed.
It took me a while to realise the current behaviour is intended whereby started tvshows show the clock icon rather than unwatched episodes. Like you I'd rather see the unwatched.
I forgot about sets as I don't use them. Code added to deal with them.
Here's the updated code for always showing unwatched episodes and movie progress.
Edit Includes_Objects.xml and replace the entire include as below (line 796)
Code:
<include name="Object_Indicator">
<param name="affix" default="" />
<param name="listitem" default="ListItem" />
<param name="selected" default="false" />
<param name="shadow" default="true" />
<param name="gradient_fade" default="0" />
<definition>
<control type="group">
<nested />
<centerbottom>0</centerbottom>
<right>25</right>
<width>64</width>
<height>64</height>
<!-- *** Adds the selected overlay circle -->
<include content="Object_Control" condition="$PARAM[selected]">
<param name="control" value="group" />
<include content="Dimension_Padding" condition="Skin.HasSetting(SelectBox.Thin)"><param name="pad" value="5" /></include>
<control type="image">
<include content="Dimension_Padding"><param name="pad" value="-32" /></include>
<texture colordiffuse="shadow_hard">$VAR[Image_Overlay_Backing$PARAM[affix],,-fo-shadow.png]</texture>
<visible>$PARAM[shadow]</visible>
</control>
<control type="image">
<texture colordiffuse="$VAR[ColorHighlight]">$VAR[Image_Overlay_Backing$PARAM[affix],,-fo.png]</texture>
</control>
<control type="image">
<animation effect="fade" end="$PARAM[gradient_fade]" condition="true">Conditional</animation>
<texture colordiffuse="$VAR[ColorGradient]">$VAR[Image_Overlay_Backing$PARAM[affix],,-fo.png]</texture>
</control>
</include>
<control type="image">
<texture colordiffuse="ff333333">$VAR[Image_Overlay_Backing$PARAM[affix],,-bg.png]</texture>
</control>
<!-- *** Adds the green progress indicator. -->
<include content="Object_Control" condition="!Skin.HasSetting(Indicator.DisableProgress)">
<param name="control">image</param>
<include content="Dimension_Padding"><param name="pad" value="0" /></include>
<texture colordiffuse="$VAR[ColorWatchedProgress]">$VAR[Defs_PercentPlayed$PARAM[affix],progress/circle/p,.png]</texture>
<aspectratio align="center" aligny="center">keep</aspectratio>
<visible>String.IsEmpty($PARAM[listitem].Property(role))</visible>
</include>
<!-- *** Adds progress time background / recently added icon /sets .-->
<control type="image">
<texture>$VAR[Image_Overlay_Backing$PARAM[affix],,-fg.png]</texture>
</control>
<!-- *** Adds icon so only display if not showing unwatched episodes-->
<control type="image">
<include content="Dimension_Padding"><param name="pad" value="20" /></include>
<texture>$VAR[Image_Overlay$PARAM[affix]]</texture>
<!-- *** Don't show icon if it's a tvshow or a season - unwatched episodes will be shown instead-->
<visible>!String.IsEqual($PARAM[listitem].DBType,tvshow) + !String.IsEqual($PARAM[listitem].DBType,season)</visible>
</control>
<!-- *** Completed Tick -->
<control type="image">
<include content="Dimension_Padding"><param name="pad" value="20" /></include>
<texture colordiffuse="$VAR[ColorWatchedProgress]">indicator/checkmark.png</texture>
<visible>!Skin.HasSetting(Indicator.DisableWatched)</visible>
<visible>String.IsEqual($PARAM[listitem].Overlay,OverlayWatched.png) | [!String.IsEmpty($PARAM[listitem].PlayCount) + !Integer.IsEqual($PARAM[listitem].PlayCount,0) + !String.IsEqual($PARAM[listitem].DBType,song) + !String.IsEqual($PARAM[listitem].DBType,album) + !String.IsEqual($PARAM[listitem].DBType,artist) + !String.IsEqual($PARAM[listitem].DBType,image) + !String.IsEqual($PARAM[listitem].DBType,addon)]</visible>
<visible>Integer.IsEqual($PARAM[listitem].Property(UnWatchedEpisodes),0) | Skin.HasSetting(Indicator.DisableEpisodes)</visible>
<visible>!$PARAM[listitem].IsRecording + !$PARAM[listitem].HasTimer</visible>
<visible>!$PARAM[listitem].IsResumable | Skin.HasSetting(Indicator.DisableProgress)</visible>
<visible>![!String.IsEmpty($PARAM[listitem].Property(role)) + [String.IsEqual($PARAM[listitem].DBType,tvshow) | String.IsEqual($PARAM[listitem].DBType,season)] + !Skin.HasSetting(Indicator.DisableEpisodes)]</visible>
</control>
<!-- *** Unwatched episodes -->
<control type="label">
<font>font_hint_bold</font>
<align>center</align>
<aligny>center</aligny>
<textcolor>panel_fg_100</textcolor>
<label>$INFO[$PARAM[listitem].Property(UnWatchedEpisodes)]</label>
<visible>[!Integer.IsEqual($PARAM[listitem].Property(UnWatchedEpisodes),0) + [String.IsEqual($PARAM[listitem].DBType,tvshow) | String.IsEqual($PARAM[listitem].DBType,season) | String.IsEqual($PARAM[listitem].DBType,episode)] + !Skin.HasSetting(Indicator.DisableEpisodes)]</visible>
<!-- *** Removed as blocks Unwatched episodes after show has been started
<visible>!$PARAM[listitem].IsResumable | Skin.HasSetting(Indicator.DisableProgress)</visible>
-->
<visible>![!String.IsEmpty($PARAM[listitem].Property(role)) + [String.IsEqual($PARAM[listitem].DBType,tvshow) | String.IsEqual($PARAM[listitem].DBType,episode) | String.IsEqual($PARAM[listitem].DBType,season)] + !Skin.HasSetting(Indicator.DisableEpisodes)]</visible>
</control>
<control type="label">
<font>font_hint_bold</font>
<align>center</align>
<aligny>center</aligny>
<textcolor>panel_fg_100</textcolor>
<label>$INFO[$PARAM[listitem].Property(Episodes)]</label>
<visible>!String.IsEmpty($PARAM[listitem].Property(role)) + [String.IsEqual($PARAM[listitem].DBType,tvshow) | String.IsEqual($PARAM[listitem].DBType,season)] + !Skin.HasSetting(Indicator.DisableEpisodes)</visible>
</control>
</control>
</definition>
</include>
And for anyone that wants a a numerical percentage progress for Movies and Episodes as well as always showing unwatched episodes. There was a previous request for this.
Edit Includes_Objects.xml and replace the entire include as below (line 796)
Code:
<include name="Object_Indicator">
<param name="affix" default="" />
<param name="listitem" default="ListItem" />
<param name="selected" default="false" />
<param name="shadow" default="true" />
<param name="gradient_fade" default="0" />
<definition>
<control type="group">
<nested />
<centerbottom>0</centerbottom>
<right>25</right>
<width>64</width>
<height>64</height>
<!-- *** Adds the selected overlay circle -->
<include content="Object_Control" condition="$PARAM[selected]">
<param name="control" value="group" />
<include content="Dimension_Padding" condition="Skin.HasSetting(SelectBox.Thin)"><param name="pad" value="5" /></include>
<control type="image">
<include content="Dimension_Padding"><param name="pad" value="-32" /></include>
<texture colordiffuse="shadow_hard">$VAR[Image_Overlay_Backing$PARAM[affix],,-fo-shadow.png]</texture>
<visible>$PARAM[shadow]</visible>
</control>
<control type="image">
<texture colordiffuse="$VAR[ColorHighlight]">$VAR[Image_Overlay_Backing$PARAM[affix],,-fo.png]</texture>
</control>
<control type="image">
<animation effect="fade" end="$PARAM[gradient_fade]" condition="true">Conditional</animation>
<texture colordiffuse="$VAR[ColorGradient]">$VAR[Image_Overlay_Backing$PARAM[affix],,-fo.png]</texture>
</control>
</include>
<control type="image">
<texture colordiffuse="ff333333">$VAR[Image_Overlay_Backing$PARAM[affix],,-bg.png]</texture>
</control>
<!-- *** Adds the green progress indicator. -->
<include content="Object_Control" condition="!Skin.HasSetting(Indicator.DisableProgress)">
<param name="control">image</param>
<include content="Dimension_Padding"><param name="pad" value="0" /></include>
<texture colordiffuse="$VAR[ColorWatchedProgress]">$VAR[Defs_PercentPlayed$PARAM[affix],progress/circle/p,.png]</texture>
<aspectratio align="center" aligny="center">keep</aspectratio>
<visible>String.IsEmpty($PARAM[listitem].Property(role))</visible>
</include>
<!-- *** Adds progress time background / recently added icon /sets .-->
<control type="image">
<texture>$VAR[Image_Overlay_Backing$PARAM[affix],,-fg.png]</texture>
</control>
<!-- *** Adds progress % for movies and episodes -->
<control type="label">
<font>font_hint_bold</font>
<align>center</align>
<aligny>center</aligny>
<textcolor>panel_fg_100</textcolor>
<label>$INFO[listitem.PercentPlayed]</label>
<visible>!String.IsEqual(listitem.PercentPlayed,0) + [String.IsEqual($PARAM[listitem].DBType,movie) | String.IsEqual($PARAM[listitem].DBType,episode)]</visible>
</control>
<!-- *** Adds icon so only display if not showing unwatched episodes-->
<control type="image">
<include content="Dimension_Padding"><param name="pad" value="20" /></include>
<texture>$VAR[Image_Overlay$PARAM[affix]]</texture>
<!-- *** Don't show icon if it's media unless it's a set-->
<visible>[!$PARAM[listitem].IsResumable + !String.IsEqual($PARAM[listitem].DBType,tvshow) + !String.IsEqual($PARAM[listitem].DBType,season)] | String.IsEqual($PARAM[listitem].DBType,set)</visible>
</control>
<!-- *** Completed Tick -->
<control type="image">
<include content="Dimension_Padding"><param name="pad" value="20" /></include>
<texture colordiffuse="$VAR[ColorWatchedProgress]">indicator/checkmark.png</texture>
<visible>!Skin.HasSetting(Indicator.DisableWatched)</visible>
<visible>String.IsEqual($PARAM[listitem].Overlay,OverlayWatched.png) | [!String.IsEmpty($PARAM[listitem].PlayCount) + !Integer.IsEqual($PARAM[listitem].PlayCount,0) + !String.IsEqual($PARAM[listitem].DBType,song) + !String.IsEqual($PARAM[listitem].DBType,album) + !String.IsEqual($PARAM[listitem].DBType,artist) + !String.IsEqual($PARAM[listitem].DBType,image) + !String.IsEqual($PARAM[listitem].DBType,addon)]</visible>
<visible>Integer.IsEqual($PARAM[listitem].Property(UnWatchedEpisodes),0) | Skin.HasSetting(Indicator.DisableEpisodes)</visible>
<visible>!$PARAM[listitem].IsRecording + !$PARAM[listitem].HasTimer</visible>
<visible>!$PARAM[listitem].IsResumable | Skin.HasSetting(Indicator.DisableProgress)</visible>
<visible>![!String.IsEmpty($PARAM[listitem].Property(role)) + [String.IsEqual($PARAM[listitem].DBType,tvshow) | String.IsEqual($PARAM[listitem].DBType,season)] + !Skin.HasSetting(Indicator.DisableEpisodes)]</visible>
</control>
<!-- *** Unwatched episodes -->
<control type="label">
<font>font_hint_bold</font>
<align>center</align>
<aligny>center</aligny>
<textcolor>panel_fg_100</textcolor>
<label>$INFO[$PARAM[listitem].Property(UnWatchedEpisodes)]</label>
<visible>[!Integer.IsEqual($PARAM[listitem].Property(UnWatchedEpisodes),0) + [String.IsEqual($PARAM[listitem].DBType,tvshow) | String.IsEqual($PARAM[listitem].DBType,season) | String.IsEqual($PARAM[listitem].DBType,episode)] + !Skin.HasSetting(Indicator.DisableEpisodes)]</visible>
<!-- *** Removed as blocks Unwatched episodes after show has been started
<visible>!$PARAM[listitem].IsResumable | Skin.HasSetting(Indicator.DisableProgress)</visible>
-->
<visible>![!String.IsEmpty($PARAM[listitem].Property(role)) + [String.IsEqual($PARAM[listitem].DBType,tvshow) | String.IsEqual($PARAM[listitem].DBType,episode) | String.IsEqual($PARAM[listitem].DBType,season)] + !Skin.HasSetting(Indicator.DisableEpisodes)]</visible>
</control>
<control type="label">
<font>font_hint_bold</font>
<align>center</align>
<aligny>center</aligny>
<textcolor>panel_fg_100</textcolor>
<label>$INFO[$PARAM[listitem].Property(Episodes)]</label>
<visible>!String.IsEmpty($PARAM[listitem].Property(role)) + [String.IsEqual($PARAM[listitem].DBType,tvshow) | String.IsEqual($PARAM[listitem].DBType,season)] + !Skin.HasSetting(Indicator.DisableEpisodes)</visible>
</control>
</control>
</definition>
</include>