[HOW TO] Library Node Examples

  Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Prot0n Offline
Junior Member
Posts: 16
Joined: Mar 2016
Reputation: 0
Location: Spain
Post: #46
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
find quote
accagì Offline
Junior Member
Posts: 8
Joined: Mar 2016
Reputation: 0
Location: Italy
Post: #47
(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.)
find quote
DaveBlake Offline
Team-Kodi Member
Posts: 2,155
Joined: Jun 2015
Reputation: 56
Location: South West England
Post: #48
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.
find quote
zag Offline
Retired Team-Kodi Member
Posts: 4,006
Joined: Oct 2007
Reputation: 75
Location: UK
Post: #49
Music sets anyone....?

[Image: screenshot013.png]

\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.
(This post was last modified: 2016-05-23 21:37 by zag.)
find quote
black_eagle Offline
Posting Freak
Posts: 1,815
Joined: Sep 2013
Reputation: 79
Location: East Yorkshire, UK
Post: #50
(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

Learning Linux the hard way !!
find quote
zag Offline
Retired Team-Kodi Member
Posts: 4,006
Joined: Oct 2007
Reputation: 75
Location: UK
Post: #51
Good spot!
find quote
HomerJau Offline
Senior Member
Posts: 188
Joined: Nov 2014
Reputation: 5
Location: Melbourne, AU
Post: #52
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!
find quote
Govnah Offline
Senior Member
Posts: 105
Joined: Nov 2010
Reputation: 0
Post: #53
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
find quote
DaveBlake Offline
Team-Kodi Member
Posts: 2,155
Joined: Jun 2015
Reputation: 56
Location: South West England
Post: #54
(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.
(This post was last modified: 2016-06-02 10:20 by DaveBlake.)
find quote
DaveBlake Offline
Team-Kodi Member
Posts: 2,155
Joined: Jun 2015
Reputation: 56
Location: South West England
Post: #55
(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 Default_Icons (wiki)
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
find quote
Govnah Offline
Senior Member
Posts: 105
Joined: Nov 2010
Reputation: 0
Post: #56
(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!
(This post was last modified: 2016-06-02 16:11 by Govnah.)
find quote
DaveBlake Offline
Team-Kodi Member
Posts: 2,155
Joined: Jun 2015
Reputation: 56
Location: South West England
Post: #57
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?
(This post was last modified: 2016-06-02 19:08 by DaveBlake.)
find quote
Govnah Offline
Senior Member
Posts: 105
Joined: Nov 2010
Reputation: 0
Post: #58
(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!
(This post was last modified: 2016-06-03 13:16 by zag.)
find quote
DaveBlake Offline
Team-Kodi Member
Posts: 2,155
Joined: Jun 2015
Reputation: 56
Location: South West England
Post: #59
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
(This post was last modified: 2016-06-02 18:43 by DaveBlake.)
find quote
Govnah Offline
Senior Member
Posts: 105
Joined: Nov 2010
Reputation: 0
Post: #60
(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>
(This post was last modified: 2016-06-02 18:45 by Govnah.)
find quote
Post Reply