BigNoid / Aeon-Nox

A skin for XBMC/Kodi
Other
255 stars 187 forks source link

Add option to hide video ratings in List, LowList and TriPanel #662

Closed hauptbenutzer closed 9 years ago

hauptbenutzer commented 9 years ago

I just had the pleasure of testing this marvelous skin for the first time the other day. While having my movie snob friends over, however, it became abundantly clear I needed an option to disable the display of movie ratings altogether. Helps keeping an open mind.

Anyway, this PR introduces the possibility to toggle ratings globally for views of type List, LowList and TriPanel. Ratings are displayed regardless of the setting, if the list is sorted by them.

BigNoid commented 9 years ago

I like the idea! Just hiding the value in lowlist and tripanel is okay for me. But for list view I'd rather have it different:

                        <control type="label">
                            <width>1060</width>
                            <height>116</height>
                            <font>font30</font>
                            <align>right</align>
                            <textcolor>grey2</textcolor>
                            <selectedcolor>selected</selectedcolor>
                            <aligny>center</aligny>
                            <label>$INFO[ListItem.Rating]</label>
                            <visible>[StringCompare(ListItem.Label2,ListItem.Rating) + !Skin.HasSetting(Enable.HideRatings)] | StringCompare(Container.SortMethod,$LOCALIZE[563])</visible>
                        </control>
                        <control type="label">
                            <left>5</left>
                            <width>1060</width>
                            <height>116</height>
                            <font>font15</font>
                            <align>right</align>
                            <textcolor>grey2</textcolor>
                            <selectedcolor>selected</selectedcolor>
                            <aligny>center</aligny>
                            <label>$VAR[VideoListLabelVar]</label>
                            <visible>[!StringCompare(ListItem.Label2,ListItem.Rating) | Skin.HasSetting(Enable.HideRatings)] + !StringCompare(Container.SortMethod,$LOCALIZE[563])</visible>
                        </control>

with variable added here:

    <variable name="VideoListLabelVar">
        <value condition="Skin.HasSetting(Enable.HideRatings) + StringCompare(ListItem.Label2,ListItem.Rating)">$INFO[ListItem.Year]</value>
        <value>$INFO[ListItem.Label2]</value>
    </variable>

eg show year in smaller font when this setting is active and label2 is rating, except for when its sorted by rating.

BigNoid commented 9 years ago

strings.po should be changed here instead of English (US).

hauptbenutzer commented 9 years ago

Thanks for taking the time to look into this! I included your suggestions and corrections but took the liberty to extend the condition on the VideoListLabel variable, so it could be reused in the movie collections view.

BigNoid commented 9 years ago

Looks good, thx!