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 - Prot0n - 2016-03-31

TOP 250 Node:

Code:
<?xml version='1.0' encoding='UTF-8'?>
<node type="filter">
    <label>TOP 250</label>
    <content>movies</content>
    <rule field="top250" operator="greaterthan">
        <value>0</value>
    </rule>
    <order direction="ascending">top250</order>
    <rule field="title" operator="contains">
        <value />
    </rule>
</node>

note: scan your movie library with Universal Movie Scraper. Movies which are not in the 250 list are assigned a 0 value


RE: [HOW TO] Library Node Examples - accagì - 2016-04-28

(2016-03-18, 19:08)accagì Wrote: I wanted the composers on the first level (together with albums etc.) and not hidden in the roles. Krypton offers a simple way to have it, step by step:

- enter node editor (options panel on the left)
- new node, give it a name ("Compositori" for me; I live in Italy)
- still in the editor click the new node
- add path (add content doesn't work, because it doesn't offer neither roles nor composers): musicdb://artists/?role=Composer

I found the path clicking (in the editor) Roles -> Composers

Smile It works!

UPDATE:

Since the node editor currently does not work ( ? A problem of the alpha version ? ) , I opened the xml file and I found that thus the purpose of having e.g. composers on the first level may be reached in an even better way :

- Open the file .kodi / userdata / library / music / musicroles / Composers.xml

< ? Xml version = ' 1.0 ' encoding = ' UTF - 8 ' ? >
<Node order = " 1 " type = "folder" visible = " Library.HasContent (Role , Composer ) " >
<Label > Composers < / label>
<Icon > DefaultMusicGenres.png < / icon >
< Path> musicdb : // artists / ? Role = Composer < / path>
< / Node >

- Delete the "visible " in the second line that the file looks like this

<?xml version='1.0' encoding='UTF-8'?>
<node order="1" type="folder">
<label>Compositori</label>
<icon>DefaultMusicGenres.png</icon>
<path>musicdb://artists/?role=Composer</path>
</node>

- Save it on the first level .kodi / userdata / library / music / Composers.xml

Done!

The node editor works! Examining the list of add-ons I simply found it disabled - a wrong click or one of the numerous updates. (It's the first time that I try an alpha version, and it is quite interesting. My "real" media centre is a raspberry pi with Kodi 16.1.)


RE: [HOW TO] Library Node Examples - DaveBlake - 2016-04-29

Yes, the node editor has been updated too Smile
Glad you are exploring the new features in alpha. There may be instabilities as it is a work in progress, but it is good to get users involved trying things out.


RE: [HOW TO] Library Node Examples - zag - 2016-05-23

Music sets anyone....?

Image

\userdata\library\music\musicsets\index.xml

PHP Code:
<?xml version='1.0' encoding='UTF-8'?>
<node order="21">
    <label>Music Sets</label>
</node> 

\userdata\library\music\musicsets\now-thatswhaticallmusic.xml

PHP Code:
<?xml version='1.0' encoding='UTF-8'?>
<node order="1" type="filter">
    <label>Now Thats What I Call Music!</label>
    <content>albums</content>
    <rule field="album" operator="contains">
        <value>Now That's What I Call Music!</value>
    </rule>
    <order direction="ascending">album</order>
    <icon>C:\Icons\now-thats-what-i-call-music.jpg</icon>
</node> 

Pretty easy one, but makes browsing VA compilations so easy now Big Grin

NOTE: If you tag with musicbrainz picard, you should get all album names perfectly correct and standard so that this works.


RE: [HOW TO] Library Node Examples - black_eagle - 2016-05-23

(2016-05-23, 21:29)zag Wrote: NOTE: If you tag with musicbrainz picard, you should get all album names perfectly correct and standard so that this works.

Except, the first 9 do not have the '!' at the end. So, I have a similar node, but defined like this

Code:
<?xml version='1.0' encoding='UTF-8'?>
<node order="12" type="filter">
    <label>NOW ALBUMS</label>
    <content>albums</content>
    <order direction="descending">year</order>
    <rule field="album" operator="startswith">
        <value>Now</value>
    </rule>
    <rule field="albumartist" operator="is">
        <value>Various Artists</value>
    </rule>
</node>

I do like the icon though !! Nod


RE: [HOW TO] Library Node Examples - zag - 2016-05-23

Good spot!


RE: [HOW TO] Library Node Examples - HomerJau - 2016-05-31

Can someone please point me to info regarding the icons used by nodes?

1. Where are the default icons located? (Maybe I can use those)
2. Where can user icons be located? (I'd like to use 'userdata' if poosible)
3. What resolution for user defined icons?

Thanks!


RE: [HOW TO] Library Node Examples - Govnah - 2016-06-02

Having an issue separating/filtering my MP3s and FLAC music directories. My paths are as follows and added both paths and scanned successfully in KODI, /Music/Lossy/Artist/Album and /Music/Lossless/Artist/Album. Created Smart Playlists and Nodes based off of path. No matter what I attempt, KODI always includes all album/music.

Any suggestions would be welcomed and I have read all the posts and suggestions without success. Should I create the nodes before adding and scanning into KODI?

Thanks


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

(2016-06-02, 06:11)Govnah Wrote: Having an issue separating/filtering my MP3s and FLAC music directories. My paths are as follows and added both paths and scanned successfully in KODI, /Music/Lossy/Artist/Album and /Music/Lossless/Artist/Album. Created Smart Playlists and Nodes based off of path. No matter what I attempt, KODI always includes all album/music.

Any suggestions would be welcomed and I have read all the posts and suggestions without success. Should I create the nodes before adding and scanning into KODI?

Govnah I suspect you need to add a % at the end of your path rules. Post the node files here so we can see what you are doing.

Nodes can be created after scanning, makes no difference.


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

(2016-05-31, 03:06)HomerJau Wrote: Can someone please point me to info regarding the icons used by nodes?

1. Where are the default icons located? (Maybe I can use those)
2. Where can user icons be located? (I'd like to use 'userdata' if poosible)
3. What resolution for user defined icons?

1) The icons listed here http://kodi.wiki/view/Default_Icons
They are part of the skin, so different skins will have different versions of these files held with the rest of the skin.

2) You can use any location, just give the full path to it e.g. <icon>C:\Icons\now-thats-what-i-call-music.jpg</icon>

3) Not sure about resolution. The default ones seem to be 256 x 256, but I'm sure bigger is OK too


RE: [HOW TO] Library Node Examples - Govnah - 2016-06-02

(2016-06-02, 10:06)DaveBlake Wrote:
(2016-06-02, 06:11)Govnah Wrote: Having an issue separating/filtering my MP3s and FLAC music directories. My paths are as follows and added both paths and scanned successfully in KODI, /Music/Lossy/Artist/Album and /Music/Lossless/Artist/Album. Created Smart Playlists and Nodes based off of path. No matter what I attempt, KODI always includes all album/music.

Any suggestions would be welcomed and I have read all the posts and suggestions without success. Should I create the nodes before adding and scanning into KODI?

Govnah I suspect you need to add a % at the end of your path rules. Post the node files here so we can see what you are doing.

Nodes can be created after scanning, makes no difference.

Here you go:

<?xml version='1.0' encoding='UTF-8'?>
<node type="filter">
<label>Flac Albums</label>
<content>albums</content>
<order direction="ascending">album</order>
<rule field="path" operator="is">
<value>C:\users\patgu\music\lossless</value>
</rule>
</node>

<?xml version='1.0' encoding='UTF-8'?>
<node type="filter">
<label>MP3 Albums</label>
<content>albums</content>
<order direction="ascending">album</order>
<rule field="path" operator="is">
<value>C:\users\patgu\music\lossy</value>
</rule>
</node>

Smart Play-list (Also populates all - MP3 and Flac)

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="songs">
<name>Flac</name>
<match>all</match>
<rule field="filename" operator="endswith">
<value>flac</value>
</rule>
</smartplaylist>


Thanks!


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

Govnah for filtering albums or songs to separate your two kinds of music in /Music/Lossy/Artist/Album and /Music/Lossless/Artist/Album I would use the "startswith" operator rather than "is". e.g.
Edit: albums by path only avaibal from Kodi 17 onwards
Code:
<?xml version='1.0' encoding='UTF-8'?>
<node type="filter">
<label>Lossless Albums</label>
<content>albums</content>
<order direction="ascending">album</order>
<rule field="path" operator="startswith">
<value>C:\users\patgu\music\lossless\</value>
</rule>
</node>

The "ends with flac" smart playlist works for me as it is, but not for you?


RE: [HOW TO] Library Node Examples - Govnah - 2016-06-02

(2016-06-02, 17:53)DaveBlake Wrote: Govnah for filtering albums or songs to separate your two kinds of music in /Music/Lossy/Artist/Album and /Music/Lossless/Artist/Album I would use the "startswith" operator rather than "is". e.g.

Code:
<?xml version='1.0' encoding='UTF-8'?>
<node type="filter">
<label>Lossless Albums</label>
<content>albums</content>
<order direction="ascending">album</order>
<rule field="path" operator="startswith">
<value>C:\users\patgu\music\lossless\</value>
</rule>
</node>

Playlist are working....will work on the nodes....

Thanks!


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

Not sure re-installation will help you, as I can't see what could prevent rules from working. Going to probably ask silly questions now, but something has been overlooked or misunderstood somewhere....

You have scanned your music files and created a library. The standard nodes list genres, artists, albums, songs etc. You then create a smart playlist of type "albums" with rule "path" "startswith" "C:\users\patgu\music\lossless\". Then click on that playlist what songs do you see? Perhaps provide screenshots of playlist editor and end results?


Edit: Ah, hang on may have found a bug in 16.1. "albums" by "path" rules not working properly


RE: [HOW TO] Library Node Examples - Govnah - 2016-06-02

(2016-06-02, 18:31)DaveBlake Wrote: Not sure re-installation will help you, as I can't see what could prevent rules from working. Going to probably ask silly questions now, but something has been overlooked or misunderstood somewhere....

You have scanned your music files and created a library. The standard nodes list genres, artists, albums, songs etc. You then create a smart playlist of type "albums" with rule "path" "startswith" "C:\users\patgu\music\lossless\". Then click on that playlist what songs do you see? Perhaps provide screenshots of playlist editor and end results?

Edit: Ah, hang on may have found a bug in 16.1


Playlists are working, Nodes work if I set "content" to songs and does not work if I set "content" to albums.

If I change the Node/Content to "Songs" it works. Any way to group/list as Albums? If content is set to Albums all of my music is populates, both MP3s and Flac.

<?xml version='1.0' encoding='UTF-8'?>
<node type="filter">
<label>Flac Albums</label>
<content>songs</content>
<order direction="ascending">album</order>
<rule field="path" operator="startswith">
<value>C:\users\patgu\music\lossless\</value>
</rule>
</node>