Kodi Community Forum
Any Way to Hide Nodes With No Content? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: Any Way to Hide Nodes With No Content? (/showthread.php?tid=343086)



Any Way to Hide Nodes With No Content? - Kriven - 2019-04-17

Is there any way to tell a node not to display if the list will not be populated? For instance, I have nodes for networks + playcount (for example, Studio = TNT, Playcount = Less Than 1) and I'd like to set it so that when that list is empty, so that all episodes with Studio TNT are now at playcount greater than or equal to 1 the TNT node does not appear at all.

If it's not possible that's fine. I feel like it might be, though, and I just haven't figured it out.


RE: Any Way to Hide Nodes With No Content? - the_other_guy - 2019-04-17

you could make a smart play list
xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="artists">
    <name>&apos;Weird Al&apos; Yankovic</name>
    <match>all</match>
    <rule field="artist" operator="is">
        <value>&quot;Weird Al&quot; Yankovic</value>
    </rule>
</smartplaylist>
take between smart playlist
xml:
<name>&apos;Weird Al&apos; Yankovic</name>
    <match>all</match>
    <rule field="artist" operator="is">
        <value>&quot;Weird Al&quot; Yankovic</value>
    </rule>
and paste in to a node
xml:
<?xml version='1.0' encoding='UTF-8'?> 
<node order="1" type="filter">
 <icon></icon>
<label>A</label> 
 <name>a</name>
<content>movies</content> 
<match>one</match>
<rule field="originaltitle" operator="startswith"> 
<value>a</value>
 <rule field="originaltitle" operator="startswith">
        <value>THE A</value>
    </rule>
</rule> 

</node> 
xml:
<?xml version='1.0' encoding='UTF-8'?> 
<node order="1" type="filter">
 <icon></icon>
 <name>&apos;Weird Al&apos; Yankovic</name>
    <match>all</match>
    <rule field="artist" operator="is">
        <value>&quot;Weird Al&quot; Yankovic</value>
    </node></rule>



RE: Any Way to Hide Nodes With No Content? - Kriven - 2019-04-17

<?xml version='1.0' encoding='UTF-8'?>
<node order="720" type="filter">
    <label>TNT</label>
    <content>episodes</content>
    <order direction="ascending">episode</order>
    <rule field="tag" operator="contains">
        <value>Adult</value>
    </rule>
    <rule field="studio" operator="contains">
        <value>TNT</value>
    </rule>
    <rule field="playcount" operator="lessthan">
        <value>1</value>
    </rule>
    <icon>D:\Kodi-tnt.png</icon>
</node>

So I already have it populating just fine. What I want it to do is disappear when the list contains zero episodes and to reappear if/when I add a series which provides the list with one new episode.

What I need is something to put in the <node> tag which tells it that visibility is set only when the list contains content.

<node order="720" type="filter" visible="Huh">

Essentially something like:

Library.TVShow(Studio, TNT) + Library.TVShow(Playcount, Lessthanone)

(granted, that wouldn't work exactly as I need it to because it doesn't cross-reference the playcount with the studio check, but Kodi doesn't support such commands anyway).