How to use audio nodes with Kodi 16 ?
#1
I created a menu item referring to a video library node, which allows me just to see movies, which are part of a defined path, please see below for an example.

As Kodi 16 now also offers audio nodes, can I do something similarly within the music library ? How ?

(no, I don't want to use smartplay lists and it should work for the library view, not just the file view)

Thanks, malvinas2

cine_latino.xml:
Code:
<node order="10" type="filter">
  <label>Cine Latino</label>
  <icon></icon>
  <content>movies</content>
  <match>one</match>
  <rule field="path" operator="startswith"><value>smb://DS215J/video/Cine argentino/</value></rule>
  <rule field="path" operator="startswith"><value>smb://DS215J/video/Cine peruano/</value></rule>
  <rule field="path" operator="startswith"><value>smb://DS215J/video/Cine espanol/</value></rule>
  <rule field="path" operator="startswith"><value>smb://DS215J/video/Cine latino/</value></rule>
    <order direction="ascending">sorttitle</order>
</node>
Reply
#2
You can create a filter type custom music node that selects songs based on path (does not work for albums or artists). Something like

Code:
<?xml version='1.0' encoding='UTF-8'?>
<node order="2" type="filter">
<label>path test songs</label>
<icon>DefaultMusicSongs.png</icon>
<content>songs</content>
<rule field="path" operator="startswith"><value>C:\Test Music\</value></rule>
</node>

Add the xml file to the userdata/library/music folder. I found on Windows that I had to use "\" in the path name. Works in Isengard too.

Would be useful to be able to filter albums and artists based on them having songs located by path too, I might have a look at adding that when I have time.
Reply
#3
(2016-01-03, 18:15)DaveBlake Wrote: Would be useful to be able to filter albums and artists based on them having songs located by path too, I might have a look at adding that when I have time.

Your example works like a charm, but to filter for albums and artists would indeed be the better option (well, at least IMHO that's what will be used in everyday life).
Would be great if you could add this feature.
Reply
#4
I have had a quick look at filtering artists and albums by the path location of their songs, and it is fairly straight forward addition. But do note that custom nodes/playlist filtering works differently from the default nodes.

For example in the default nodes selecting genre of "funk" you get a list of artists that have songs with a "funk" as a genre. Click on one of those artists and you get a list of only those albums for that artist that have songs with a "funk" as a genre. Click on an album and you get a list of only those songs from that album with a "funk" as a genre. At album and artist level you also get a *all item that skips a level.

In comparison, although a filter type custom node of content "artists" with rule "genre is funk" will show that same list of artists as above, when you click on an artist you will then see all the albums for that artist regardless of genre. Likewise clicking on one of those albums will display all the songs.

The filtering on default nodes passes down the levels, the filtering on custom nodes and playlists does not. So if you make an artist playlist based on rules applied to the songs, although only some of the songs may meet the criteria all of them will be played.

So say you had albums and songs for an artist on two separate drives, and you wanted to see only the music from each of them separately, then an artist level path filter custom node would not help. Having said that I can't see why you would want to split an artist's work in that way.

A much bigger change would be needed to get custom nodes/playlists to pass the filtering down so that only songs that meet the criteria applied to artists or albums are played. Not sure there is sufficient interest in that to make it worthwhile. What do you think?
Reply
#5
(2016-01-04, 13:08)DaveBlake Wrote: I have had a quick look at filtering artists and albums by the path location of their songs, and it is fairly straight forward addition. But do note that custom nodes/playlist filtering works differently from the default nodes.
What does that mean? Instead of <content>songs</content> I can simply write <content>artists</content> resp. <content>albums</content> ?

(2016-01-04, 13:08)DaveBlake Wrote: -detailed explanation-
Is this explanation already part of some wiki ? I doubt that many users know about this behaviour.

In my case I already distinguished my music into three categories resp. folders: International (english-speaking) music, national music, and spanish music. As my wife and me are the only persons speaking spanish, it wouldn't make sense presenting visitors a long list of albums or artists which they don't understand and aren't interested in.
As I create all nfo-files manually I already thought about adding self-defined genres, something like "international", "national" and "spanish". But using the path information would be much simpler than that procedure.

(2016-01-04, 13:08)DaveBlake Wrote: Not sure there is sufficient interest in that to make it worthwhile. What do you think?
Probably I should answer in capital letters: YES, OF COURSE, EVERYONE IS CRAZY ABOUT IT !!!
Honestly said, I don't think that there's high demand at the moment. But yes, in the long term it should be changed, because that way you would ensure consistency between the use of audio and video nodes. My approach works with video nodes, so why doesn't it so with audio nodes? This question will arise more often after having published officially "Kodi 16 Jarvis", particularly if the addition of audio nodes is actively promoted ("The Music Library and Files View for music have now been unified, similar to how video files and library are unified" --> well similar, but still not the same)
Reply
#6
(2016-01-04, 21:07)malvinas2 Wrote:
(2016-01-04, 13:08)DaveBlake Wrote: I have had a quick look at filtering artists and albums by the path location of their songs, and it is fairly straight forward addition. But do note that custom nodes/playlist filtering works differently from the default nodes.
What does that mean? Instead of <content>songs</content> I can simply write <content>artists</content> resp. <content>albums</content> ?
Sorry no, or rather not yet. I meant that the code additions were easy. Once done then yes then you will be able to apply path rules to artists and albums like you suggest.

Quote:Is this explanation already part of some wiki ? I doubt that many users know about this behaviour.

Nothing in Wiki to my knowledge, and I just don't have the spare time or know where to put it. Truth is few users use custom music nodes, and those that try are happy with the results I guess. The difference in behaviour between default nodes and custom node/playlist rules only becomes obvious if your music is very varied and your filter rules very precise.

Best I give an example:
Some of my songs on classical music albums are overtures, and I tagged them with a genre "Overture" but the other songs on that album and others for the same artist are not all tagged as overtures. If I drill down from default node for genre = Overture I only see the overture tracks. If I create a "artists" or "albums" type playlist or custom node with rule "genre is Overture" and then drill down to songs I get all the songs for that artist or album not just the overtures.

If my rule was something that was true for all the songs on an album, and all the albums for an artist then you would not notice this behaviour.

For playlists, where you just want to play the music, the way to get just the songs that match the criteria is to create a "songs" list and order by artist, album and track number. It is custom nodes, or using a playlist like a node as a list of artists or albums to help choose what to play, that things don't work quite as you might expect.

Quote:In my case I already distinguished my music into three categories resp. folders: International (english-speaking) music, national music, and spanish music. As my wife and me are the only persons speaking spanish, it wouldn't make sense presenting visitors a long list of albums or artists which they don't understand and aren't interested in.
As I create all nfo-files manually I already thought about adding self-defined genres, something like "international", "national" and "spanish". But using the path information would be much simpler than that procedure.

I have a similar desire to keep my classical music separate from the rest. I have tagged using "classical" to split things but path information would be much easier. The clumsy result is what set me into contributing to the dev team, but it takes time to be able to make changes. I will get there in the end!

Another solution is to use user profiles - each profile has a separate library, and only scan music of each kind into each one. This isn't ideal either, because you can only see or search one library at a time, and to switch profiles you have to have the TV on. I listen to music with my TV off, using Kore or Yatse on a tablet to control what is played. But profiles could work for you?

Quote:Honestly said, I don't think that there's high demand at the moment. But yes, in the long term it should be changed, because that way you would ensure consistency between the use of audio and video nodes. My approach works with video nodes, so why doesn't it so with audio nodes? This question will arise more often after having published officially "Kodi 16 Jarvis", particularly if the addition of audio nodes is actively promoted ("The Music Library and Files View for music have now been unified, similar to how video files and library are unified" --> well similar, but still not the same)

"The Music Library and Files View for music have now been unified, similar to how video files and library are unified" --> well similar, but still not the same)

Not sure where this is quoted from, I can see how it has been culled from a pull request description, but it does not mean what you think it does. The "unification" was a coding change that simplified things for skinnners and initially broke the file view. I hope we have restored file view functionality in the released version, and if we have then users shouldn't notice any change!

Custom music nodes have been available since Helix, they are not new.

Yes we are trying to promote the use of the music library with this release, and publicise that there are people trying to improve the music side of things, but there are only small changes in Jarvis.

Quote:My approach works with video nodes, so why doesn't it so with audio nodes?

I have probably given too much detail (I get over enthusiastic when I hear from another user interested in areas of Kodi that interest me). I think custom music nodes do work as well as the custom video nodes. Unfortunately it is too late for adding new features to Jarvis, so filtering artists and albums by path will have to wait until Krypton.

I would anticipate that all the songs for all the albums for an artist fall into one of your 3 categories - International (english-speaking) music, national music, and spanish. So the simple code change (inside Kodi) would enable you do do what you want, it is just a question of if you can wait for it.
Reply
#7
Thank you for all your explanations, think I got it ;-)
I will try using 'genres' until Krypton is published.
Reply
#8
By co-incidence there is a user complaining that video playlists work in the way I describe http://forum.kodi.tv/showthread.php?tid=254874

Music and video are in the same boat with this respect. If a playlist or filter type custom node is showing a list of artists because they have songs that satisfy some rule, then drilling down by clicking on them does not apply the same filter.

Folder type custom nodes do behave like default nodes, so filtering by genre in a folder type node will pass down. Until path rules apply to artists and albums in Krypton try things like:

Code:
<node order="1" type="folder">
<label>Spanish Artists</label>
<icon>DefaultMusicGenres.png</icon>
<path>musicdb://artists/?genre=Spanish</path>
</node>
Reply



Logout Mark Read Team Forum Stats Members Help
How to use audio nodes with Kodi 16 ?0
This forum uses Lukasz Tkacz MyBB addons.