Custom Music Nodes - "all Artists" option
#1
Just exploring the brave new world of custom music nodes and could do with a bit of advice (using Confluence skin).

In, for example, the standard genre view of the music library, once I pick a genre I see the artists with songs with that genre but also get a "* All artists" entry. Selecting that shows me all the albums with songs with that genre and so on. However if I create a custom node to show me the artists with a specific genre, this shows just the artists and does not offer an "all" entry.

Say my xml looks like this:
Code:
<?xml version='1.0' encoding='UTF-8'?>
<node type="filter">
    <label>Test Node (Country Artists)</label>
    <content>artists</content>
    <order direction="ascending">artist</order>
    <rule field="genre" operator="contains">
        <value>Country</value>
    </rule>
</node>
Is there something I can add that will make it behave like the standard view and have a "*all" entry?
Reply
#2
Anyone?
Well looking at the code I can see that processing of the default music nodes is different from custom ones (which are similar to smart playlists), despite the fact that both kinds are defined externally by xml files. In the case of the default nodes a "* all" item is added to the list but in custom/smartplaylists it isn't.

However I did find a way, in some cases, to create a custom node that got treated like the default nodes using folder path. For example in my library genre "Country" has id = 6 (I looked at the queries in the debug log). The following xml

Code:
<?xml version='1.0' encoding='UTF-8'?>
<node type="folder">
    <label>Test  Path (Country)</label>
    <path>musicdb://genres/6/</path>
</node>

displays the artists of songs with that genre, just as my previous example, but along with a "*all artists" item. That in turn shows the albums and a "*all albums" item for songs with that genre. Marvellous!

It also fetches the data quicker, the SQL being more efficient than the way a query is built from a rule (but it is all quick). I did wonder if the smartplaylist query builder could parse rules and convert some to equivalent database paths, but not familar enough with the code to know.

Where does this get me? Well I figure having tagged all my classical music with "Classical" (amongst other genre tags such as "Violin Concerto"), I should be able to create a set of custom nodes to separate the classical from the popular music but still have similar views to the default nodes including "*all" items. I'm going to give it a go anyway. Smile

Edit: Could do with a guide to the internal path definitions if there is one.
Reply
#3
(2015-08-20, 09:36)DaveBlake Wrote: Edit: Could do with a guide to the internal path definitions if there is one.

here you go: Opening_Windows_and_Dialogs (wiki)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
Thanks for the link Ronie, that covers the basic paths. Just wondering if there is any info on the additional path stuff e.g. musicdb://genres/6/-1/?genreid=6 gives me the albums view for that genre. Might have to did through the code some more.
Reply
#5
Just mumbling to myself really, but someone else might find this useful someday...

Using folder type custom nodes (and explicit genre ID read from debug log) allows me to separate my "Classical" tagged music from the rest in the way I want (with "*all" items). At the moment I manually edit the xml to set genre ID, but it would be nice to have a script do it for me (all I need is to learn Python, unless someone has something I can copy). For views excluding "Classical" I have to use filter type nodes and except that there is no "* all" item.

However I have come across a glitch in the way the rule based queries are constructed - this applies to both smart playlists and filter type custom nodes. When limiting the data to a genre the queries used for the default nodes (i.e. folder type) use both album_artist and song_artist tables, but smart playlists queries only look at song_artist. So say I have songs with "Classical" genre and "Nigel Kennedy" in the ALBUMARTIST tag but not ARTIST, then Nigel still appears in a list of artists that has rule "isnot" "Classical". Shame, and for now messing with the smartplaylist query builder is a bit beyond me. Anyone expert in that area of Kodi like to volunteer?
Reply



Logout Mark Read Team Forum Stats Members Help
Custom Music Nodes - "all Artists" option0
This forum uses Lukasz Tkacz MyBB addons.