[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) |
[HOW TO] Library Node Examples - zag - 2016-01-22 This is a thread dedicated to showing off examples of nodes that you have created for Kodi. A node is basically a filtered library. So for example only show Kids Movies, or browse music by composer or a particular year. Nodes work for both Video and Audio now. Any smart playlist can be turned into a node. They use a very similar xml format. http://kodi.wiki/view/Video_nodes http://kodi.wiki/view/Audio_nodes To test out these nodes, you will need to create an XML text file, and copy it to your userdata/library folder. Top IMDB 250 video node Code: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> Electronic Music audio only Code: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> Those are just 2 examples, please post your own below. RE: Library Node Examples - DaveBlake - 2016-01-22 There are rule type nodes, where you use same syntax as for smart playlist rules, and folder type which are more like the default nodes. Here is an example of a folder type music node that will work in Krypton onwards. Let's presume that you are intereted in music producers, and have tagged your music with the producer e.g. PRODUCER in FLAC or TIPL name (Producer) in ID3. This node will list those producers. Code: <?xml version='1.0' encoding='UTF-8'?> Can do the same with any artist role e.g. composer, conductor, DJMixer etc. The standard roles are: Composer, Conductor, Orchestra, Lyricist, Remixer, Arranger, Engineer, Producer, DJMixer, Mixer. But use of the PERFORMER or TMCL and TIPL tags can create others e.g. Soloist, Drummer etc. that can be used in juts the same way. Note the use of "albumartistsonly" to override the system albumartistsonly setting in case it is enabled, and always show all producers. If this was albumartistsonly=true it would only show those producers that were also listed as an album artist. Limiting to a role and album artist makes sense when you want to list say just composers for classical music albums rather than the composer of every song. RE: Library Node Examples - zag - 2016-01-22 A-Z first letter nodes All items starting with A: Code: <?xml version='1.0' encoding='UTF-8'?> ...and to show all items starting with B: Code: <?xml version='1.0' encoding='UTF-8'?> Notes: This is used to break your library down into nodes of starting letter. Particularly useful for people with large libraries. You can see the full list here https://github.com/xbmc/xbmc/pull/7518/files RE: Library Node Examples - DaveBlake - 2016-01-24 Want to separate your FLAC files from your mp3 etc., a general way to look at sound quality perhaps? Here is an "mp3 only" node. Code: <?xml version='1.0' encoding='UTF-8'?> RE: Library Node Examples - tkgafs - 2016-01-26 Would it be possible to have a rule that say found all the tracks over 30 minutes long ? RE: Library Node Examples - DarkHelmet - 2016-01-26 That's already possible through a new smart playlist. Put length greater than 30 minutes in the rule and that should result in what you want. RE: Library Node Examples - zag - 2016-01-26 Please post an example if you get it working, so it helps everyone RE: Library Node Examples - DarkHelmet - 2016-01-26 Code: <smartplaylist type="songs"> Put that in a text file, name it "songs longer than 30 minutes.xsp" and put in the userdata/playlist folder under music. It works for me. RE: Library Node Examples - zag - 2016-01-26 Thanks! So the corresponding node in music would be: C:\Users\username\AppData\Roaming\Kodi\userdata\library\music\LongTracks.xml Code: <?xml version='1.0' encoding='UTF-8'?> Haven't tested it yet. EDIT: works perfectly! Awesome, now we have a node for Live DJ sets RE: Library Node Examples - tkgafs - 2016-01-31 is there any way the output can be sorted by say artist, or duration etc ? at the moment the long tracks example seem to come out in order track number.artist RE: Library Node Examples - DaveBlake - 2016-01-31 Can't you just choose the sort you want on the side blade? Would be nice to set the default sort as pasrt of the node though. RE: Library Node Examples - DarkHelmet - 2016-01-31 Try adding Code: <order direction="descending">playcount</order> You should be able to use "descending", "ascending" after "order direction". Other possibility would be <order>random</order> to generate a shuffled list. If you use "descending" or "ascending", you should be able to use "title", "track", "file", "path", "lastplayed", "rating", "year", "artist", "duration", "genre" or "album" to sort by. Please note that this a guess but these codes work in smart playlists and from zag's transformation from my smart playlist example to a node I take it that nodes and smart playlists share basically the same code. RE: Library Node Examples - DaveBlake - 2016-01-31 Yes rule type nodes and smart playlists use the same rule syntax. Thanks for reminding me of the <order> xml tag, so good to be sharing information here RE: Library Node Examples - DaveBlake - 2016-01-31 Hey @zag it seems a shame that this thread is hidden away under application development. It is more an (advanced perhaps) user hints, tips and guide thing. Your average user isn't going to look in the dev forum. Just a thought. RE: Library Node Examples - zag - 2016-01-31 Moved to guides and tips section |