Kodi Community Forum
[HOW TO] Library Node Examples - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110)
+--- Thread: [HOW TO] Library Node Examples (/showthread.php?tid=257378)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


RE: [HOW TO] Library Node Examples - zag - 2016-01-31

Show all albums from a certain decade

For example: all albums from 1990 sorted in year order

C:\Users\username\AppData\Roaming\Kodi\userdata\library\music\1990sdecade.xml
Code:
<?xml version='1.0' encoding='UTF-8'?>
<node order="22" type="filter">
    <label>1990s Decade</label>
    <content>albums</content>
    <rule field="year" operator="greaterthan">
        <value>1990</value>
    </rule>
    <rule field="year" operator="lessthan">
        <value>2000</value>
    </rule>
    <order direction="ascending">year</order>
</node>



RE: [HOW TO] Library Node Examples - zag - 2016-01-31

And a video guide if you don't want to start messing with XML files.

This is also possible entirely from withing the GUI using the library node editor!




RE: [HOW TO] Library Node Examples - BobCratchett - 2016-02-01

Go directly to a node of an addon

For example, the 'Classic Rock' genre (which is both classic and it rocks) of the Radio.de plugin.

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="14" type="folder">
  <label>Classic Rock</label>
  <icon>DefaultMusicSongs.png</icon>
  <path>plugin://plugin.audio.radio_de/stations/genre/Classic+Rock/</path>
</node>

A relatively easy way to get the path is to add the node to favourites, then copy it out of the userdata (wiki)/favourites.xml file.

@zag - nice video tutorial, and nice to see that add-on still kicking around Smile But you probably want the first rule to be 'Greater than 1999', so that it includes albums from 2000 to 2009 inclusive.


RE: [HOW TO] Library Node Examples - DarkHelmet - 2016-02-03

Sice nodes and smart playlist have a lot in common. Is it possible to create a mixed node? Smart playlists can consist of mixed content. Music and Music videos in that case.


RE: [HOW TO] Library Node Examples - zag - 2016-02-03

(2016-02-03, 01:12)DarkHelmet Wrote: Sice nodes and smart playlist have a lot in common. Is it possible to create a mixed node? Smart playlists can consist of mixed content. Music and Music videos in that case.

No, I don't think so.


RE: [HOW TO] Library Node Examples - tkgafs - 2016-02-24

Would it be possible to use these nodes as a method of finding incorrect / missing audio tags

for example is it possible to say something like

<rule field="year" operator="0"> or perhaps <rule field="year" operator=NULL>

to find all the songs which do not have a year set


RE: [HOW TO] Library Node Examples - zag - 2016-02-24

Yep that should work

Please post if you get an example.


RE: [HOW TO] Library Node Examples - DaveBlake - 2016-02-24

(2016-02-24, 13:32)tkgafs Wrote: Would it be possible to use these nodes as a method of finding incorrect / missing audio tags
for example is it possible to say something like

<rule field="year" operator="0"> or perhaps <rule field="year" operator=NULL>

to find all the songs which do not have a year set

I commend the desire to improve your music tags Smile

If year is 0 then yes you can find those songs with that kind of rule. But I do need to check that no date tag always results in year = 0, and I'm no so sure that null can be used in a rule like that.


RE: [HOW TO] Library Node Examples - zag - 2016-02-26

For the Oscars Movie node:

oscars.xml
Code:
<?xml version='1.0' encoding='UTF-8'?>
<node order="10" type="filter">
    <label>Oscars 2016</label>
    <content>movies</content>
    <rule field="filename" operator="contains">
        <value>oscars</value>
    </rule>
</node>

Video Guide


Just add -oscars to the end of any movie filename for it to show up Wink


RE: [HOW TO] Library Node Examples - incubus - 2016-02-27

If something can be achieved with a smart playlist is there any advantage using a node instead ?


RE: [HOW TO] Library Node Examples - DaveBlake - 2016-02-27

(2016-02-27, 11:24)incubus Wrote: If something can be achieved with a smart playlist is there any advantage using a node instead ?

The ability to create your own node menu structure rather than just a long list of smart playlists.

But also remember that there are folder type custom nodes, they can be drilled down from like the default nodes can while smart playlist and rule type nodes can not.


RE: [HOW TO] Library Node Examples - zag - 2016-02-27

Yes for example you could have:

Movies >> Oscars >> Best Actor
Movies >> Oscars >> Best Actress
Movies >> Oscars >> Best Picture
ect

Structure. That's what makes Nodes really powerful over playlists.


RE: [HOW TO] Library Node Examples - incubus - 2016-02-27

Ok, thank you both!


RE: [HOW TO] Library Node Examples - LongMan - 2016-02-27

"Just add -oscars to the end of any movie filename for it to show up"

@zag,

With UPnP Sharing (Montellese's Work), and using Emby Server, filenames are no longer available. It may be better to use tags. So once you tag it (with Oscars) on the server it will appear on all clients.

Cheers,
LongMan


RE: [HOW TO] Library Node Examples - RonnieG3 - 2016-03-04

Please be gentle. I know nothing of coding and if this has been asked elsewhere, I apologize in advance.

From the wiki, I saw the example of the default node video/movies/years.xml and saw the following code:

(2016-01-31, 15:33)zag Wrote: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="3" type="filter">
<label>562</label>
<icon>DefaultYear.png</icon>
<content>movies</content>
<group>years</group>
</node>

Can someone explain the <label>562</label>? What is Label 562? is there a list of them for music and video?

I'm just venturing into nodes, and am trying to see how best to utilize (e.g. I have my animated films and am thing about using nodes instead of sets to group Disney, Marvel, DC, Japanese, etc in a sub menu under Animated Films on my main menu. Maybe). Like I said, just starting to try to understand them and see how they best would fit my needs.

Thanks in advance for your assistance Big Grin