Kodi Community Forum

Full Version: Unwatched Count & Seek Bar Tweak
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
First of all, my huge thanks to Bryanbrazil for the skin - this is the first one that's made me jump ship from Aeon Nox.

I have made a couple of usability tweaks on my install though, which I thought I would share. A warning in advance: this is actually my first time delving into skinning. The tweaks are still a bit WIP, and much as they work for me I can't guarantee the same for you. So please use your common sense, and make backups of any files you plan to modify! And of course, like any mod, this will break with updates.

Unwatched Count

As it stands, there's no way to easily see the Unwatched count in the series list view - Aeon Nox provides this functionality by having the count inside the Watched/Unwatched checkbox. I made a couple of small changes in View_50_List.xml to add this feature.

First, delete between lines 532 (beginning <itemlayout....) and 646 (</focusedlayout>). Then insert the following in its place:

Code:
<itemlayout height="120" width="1150" condition="Container.Content(seasons)">
                        <control type="image">
                            <left>15</left>
                            <top>8</top>
                            <width>105</width>
                            <height>105</height>
                            <aspectratio>keep</aspectratio>
                            <texture background="true">$INFO[ListItem.Icon]</texture>
                            <fadetime>IconCrossfadeTime</fadetime>
                            <visible>!SubString(ListItem.Icon,Default,left)</visible>
                        </control>
                        <control type="image">
                            <left>15</left>
                            <top>8</top>
                            <width>105</width>
                            <height>105</height>
                            <aspectratio>keep</aspectratio>
                            <texture background="true">$INFO[ListItem.Icon]</texture>
                            <fadetime>IconCrossfadeTime</fadetime>
                            <colordiffuse>grey</colordiffuse>
                            <visible>SubString(ListItem.Icon,Default,left)</visible>
                        </control>
                        <control type="label">
                            <left>135</left>
                            <width>960</width>
                            <height>120</height>
                            <font>font30</font>
                            <textcolor>grey</textcolor>
                            <selectedcolor>selected</selectedcolor>
                            <align>left</align>
                            <aligny>center</aligny>
                            <label>$INFO[ListItem.Label]</label>
                        </control>
                        <control type="label">
                            <width>1060</width>
                            <height>116</height>
                            <font>font15</font>
                            <align>right</align>
                            <textcolor>grey</textcolor>
                            <selectedcolor>selected</selectedcolor>
                            <aligny>center</aligny>
                            <label>$INFO[ListItem.Property(TotalEpisodes),, $LOCALIZE[20453]]</label>
                        </control>
                        <control type="label"> <!-- Unwatched Count On Watched Icon -->
                            <left>1076</left>
                            <top>28</top>
                            <width>64</width>
                            <height>64</height>
                            <font>font12_title</font>
                            <align>center</align>
                            <textcolor>grey</textcolor>
                            <selectedcolor>selected</selectedcolor>
                            <aligny>center</aligny>
                            <label>$INFO[ListItem.Property(UnWatchedEpisodes)]</label>
                            <visible>IntegerGreaterThan(ListItem.Property(UnWatchedEpisodes),0)</visible>
                        </control>
                        <control type="image"> <!-- Slightly Enlarged Watch Icon -->
                            <left>1064</left>
                            <top>16</top>
                            <width>88</width>
                            <height>88</height>
                            <aspectratio>keep</aspectratio>
                            <texture colordiffuse="grey">$VAR[ListItem.Overlay]</texture>
                        </control>
                    </itemlayout>
                    <focusedlayout height="120" width="1150" condition="Container.Content(seasons)">
                        <control type="image">
                            <left>0</left>
                            <top>0</top>
                            <width>1150</width>
                            <height>120</height>
                            <texture>listselect_fo.png</texture>
                            <colordiffuse>listselect</colordiffuse>
                            <visible>Control.HasFocus(50)</visible>
                            <include>VisibleFadeEffect</include>
                        </control>
                        <control type="image">
                            <left>15</left>
                            <top>8</top>
                            <width>105</width>
                            <height>105</height>
                            <aspectratio>keep</aspectratio>
                            <texture background="true">$INFO[ListItem.Icon]</texture>
                            <colordiffuse>white</colordiffuse>
                            <fadetime>IconCrossfadeTime</fadetime>
                            <visible>!SubString(ListItem.Icon,Default,left)</visible>
                        </control>
                        <control type="image">
                            <left>15</left>
                            <top>8</top>
                            <width>105</width>
                            <height>105</height>
                            <aspectratio>keep</aspectratio>
                            <texture background="true">$INFO[ListItem.Icon]</texture>
                            <fadetime>IconCrossfadeTime</fadetime>
                            <visible>SubString(ListItem.Icon,Default,left)</visible>
                        </control>
                        <control type="label">
                            <left>135</left>
                            <width>960</width>
                            <height>120</height>
                            <font>font30</font>
                            <textcolor>white</textcolor>
                            <selectedcolor>selected</selectedcolor>
                            <align>left</align>
                            <aligny>center</aligny>
                            <label>$INFO[ListItem.Label]</label>
                            <animation effect="fade" start="100" end="70" time="300" tween="sine" easing="inout" condition="!Control.HasFocus(50)">Conditional</animation>
                        </control>
                        <control type="label">
                            <width>1060</width>
                            <height>116</height>
                            <font>font15</font>
                            <align>right</align>
                            <textcolor>white</textcolor>
                            <selectedcolor>selected</selectedcolor>
                            <aligny>center</aligny>
                            <label>$INFO[ListItem.Property(TotalEpisodes),, $LOCALIZE[20453]]</label>
                            <animation effect="fade" start="100" end="70" time="300" tween="sine" easing="inout" condition="!Control.HasFocus(50)">Conditional</animation>
                        </control>
                        <control type="label"> <!-- Unwatched Count On Watched Icon -->
                            <left>1076</left>
                            <top>28</top>
                            <width>64</width>
                            <height>64</height>
                            <font>font12_title</font>
                            <align>center</align>
                            <textcolor>white</textcolor>
                            <selectedcolor>selected</selectedcolor>
                            <aligny>center</aligny>
                            <label>$INFO[ListItem.Property(UnWatchedEpisodes)]</label>
                            <visible>IntegerGreaterThan(ListItem.Property(UnWatchedEpisodes),0)</visible>
                        </control>
                        <control type="image"> <!-- Slightly Enlarged Watch Icon -->
                            <left>1064</left>
                            <top>16</top>
                            <width>88</width>
                            <height>88</height>
                            <aspectratio>keep</aspectratio>
                            <texture colordiffuse="white">$VAR[ListItem.Overlay]</texture>
                        </control>
                    </focusedlayout>

All this does is slightly enlarge the watch status circles, and if any unwatched episodes exist it puts the count in the center. Nice and simple.

Current issues: Double digit numbers still aren't quite perfect, and there's no real consideration for anything higher than 99. Additionally, due to some odd kerning in the font, some digits (1 and 6 most noticeably) don't quite sit in the center. Short of adding a whole bunch of separate conditionals to adjust them a pixel left as appropriate, or using another font, I'm not sure what to do there. I'll probably come back to this when it starts grating on me, but for now I'm content.

Seek Bar Tweak

I personally find the grouping of the information on the default seek bar to be unintuitive - mixing video time and clock time at each end just seems odd. My personal preference is to have the video information (Current Position/Total Length) on one side, and then the clock (Current Time/End Time) on the other. I just find this a bit more of a logical grouping. To implement this, you'll need to adjust two lines in DialogSeekBar.xml:

Line 42 becomes:
Code:
<label>$INFO[Player.Time]$INFO[Player.Duration,/,]</label>

Line 53 becomes:
Code:
<label>$INFO[System.Time(hh:mm xx)]$INFO[Player.FinishTime(hh:mm xx), (,])</label>

The same lines also appear in DialogFullScreenInfo.xml (at 192 and 203 respectively), and can be replaced in the same way, but I don't think I've ever actually opened that window during playback. It's also worth noting that this does NOT affect the seek bars used during live TV - they are controlled by a separate pair of lines much later in the files - 153 and 164 in DialogSeekBar. I personally don't use that feature, so I'm not in any position to judge the seek bar for it, let alone be able to actually test my tweaks.

Miscellaneous

I also made a small tweak to the font file, adjusting the Main Menu Focus font to be slightly smaller, as well as making it slightly bolder. This was because I have a playlist titled "Documentaries", which otherwise just doesn't fit when selected. I had the same problem with Aeon Nox. On line 202, change the font to weblysleekuisl.ttf (there's an additional S, changing it from Light to Semi Light), and I dropped the size on line 206 to 80.


Edit: Updated line references for version 1.0.4 from the repo.