Number of movies in library
#1
How could I go about creating a line that says "X movies available", were X is the actual number? Is there a label I can use?
Reply
#2
$INFO[Window(Home).Property(Movies.Count)]

$INFO[Window(Home).Property(Movies.Count),, movies available]

https://kodi.wiki/view/Skinning_Manual#Window_2
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#3
Thanks! It works. I'm only having a slight problem were, because of the way I have home.xml setup, the line is written on <focusedlayout>. I have two items on home, "Movies", and "TV Shows". So when I focus the "Movies" item, the number is displayed correctly, but when it's on TV Shows, it still obviously displays Movies.Count instead of TVShows.Count, because that's what the line says. Do you think there's a simple workaround for this? Something that can place the $INFO[Window(Home).Property(LABEL.Count),, available] it's meant to retrieve.

 
XML:
               <itemlayout height="540" width="1920">
                        <control type="label">
                            <left>230</left>
                            <width>600</width>
                            <height>150</height>
                            <font>Bold77</font>
                            <textcolor>80CFCFCF</textcolor>
                            <selectedcolor>80CFCFCF</selectedcolor>
                            <label>$INFO[ListItem.Label]</label>
                        </control>
                        <control type="label">
                            <top>90</top>
                            <left>270</left>
                            <font>Reg30</font>
                            <textcolor>80CFCFCF</textcolor>
                            <label>$INFO[Window(Home).Property(TVShows.Count),, available]</label>
                        </control>
                </itemlayout>
                <focusedlayout height="540" width="1920">
                        <control type="group">
                            <animation effect="zoom" time="120" start="100" end="105" center="auto" tween="Back" easing="Out">Focus</animation>
                                <control type="image">
                                    <top>-350</top>
                                    <aspectratio>keep</aspectratio>
                                    <texture background="true">general/focus_home.png</texture>
                                </control>
                                <control type="label">
                                    <font>Bold77</font>
                                    <left>250</left>
                                    <textcolor>FFFFFFFF</textcolor>
                                    <label>$INFO[ListItem.Label]</label>
                                </control>
                                <control type="label">
                                    <top>90</top>
                                    <left>250</left>
                                    <font>Reg30</font>
                                    <textcolor>FFFFFFFF</textcolor>
                                    <label>$INFO[Window(Home).Property(Movies.Count),, available]</label>
                                </control>
                        </control>
                </focusedlayout>
                <content>
                    <item>
                        <label>Movies</label>
                        <onclick>ActivateWindow(Favourites,return)</onclick>
                    </item>
                    <item>
                        <label>TV Shows</label>
                        <onclick>ActivateWindow(Videos,TvShowTitles,return)</onclick>
                    </item>
                </content>
Reply
#4
Move the propety call to the <content> area:

Code:

<item>
<label>Movies</label>
<property name="info">$INFO[Window(Home).Property(Movies.Count),, available]</property>
<onclick>ActivateWindow(Favourites,return)</onclick>
</item>

And then just use $INFO[ListItem.Property(info)]
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#5
Damn that's smart! Thanks.
Reply

Logout Mark Read Team Forum Stats Members Help
Number of movies in library0