v18 custom music nodes
#1
Hi there,
I have a question regarding nodes and in particular creating custom nodes with xml files in the userdata folder.
Firstly I have successfully created a custom node, the problem I face is getting it to work. I have read how Kodi is going down the path of promoting the use of musicbrainz for tagging of music files. I do not use it myself, but after reading various stuff on the musicbrainz website and in particular the tag mappings page, I decided to start using some of the tag fields they use. In particular releasestatus (eg. official, promotional, bootleg, pseudo-release) and releasetype (eg. album, single, ep, compilation, soundtrack etc). I thought this would be a good way to sort given that currently I use a bastardised system that has this info under the genre tag (which I'm not overly happy with). So I redid some of my file tags and set up a custom node for albums and attempted to seperate out any bootlegs only to find that <rule field="releasetype" does not work. If musicbrainz tagging is being encouraged -

1. should not any tag field used by musicbrainz be available for node rules? (also refer kodi.wiki/view/Music_tagging 4.1)
2. what rule fields are available, is there a list somewhere?
3. if I use custom tag fields am I able to add/create my own rule fields?

and as an aside

4. as far as the albumartist tag field goes (with reference to Settings> Media> Show song and album artists) you can have one off (singular) artists appear or not appear in your artist node for example, but how would you create a node that only showed those singular artists?

LibreElec
Kodi Leia 18.6
!Transparency skin
regards
Reply
#2
The rules are shared with Smartplaylists, so if you want to experiment with what's possible I'd suggest try creating a smartplaylist first. Once you have a working playlist then xsp file will prove guidance of what is needed on the custom node xml as the syntax is very similar.

The rules for smartplays can be found at https://kodi.wiki/view/Smart_playlists#Fields

However that page shows as out of date, I know there are several new fields added for v19 Matrix such bmp & samplerate that have been added by @black_eagle.
Reply
#3
(2020-05-21, 09:14)unfaesed Wrote: 1. should not any tag field used by musicbrainz be available for node rules? (also refer kodi.wiki/view/Music_tagging 4.1)

In an ideal world yes.  As @jjd-uk points out, more fields are available in V19 than 18.  Specifically, BPM, sample rate, bit rate, No. of channels, Original year, disc title, No. of Discs and is/is not a box set.
(2020-05-21, 09:14)unfaesed Wrote: 2. what rule fields are available, is there a list somewhere?

See jjd's post above ^^
(2020-05-21, 09:14)unfaesed Wrote: 3. if I use custom tag fields am I able to add/create my own rule fields?

No, not currently.  It might be possible in the future though to add custom tags to music items in the same way as video and use those for filtering.  Who knows ?
(2020-05-21, 09:14)unfaesed Wrote: 4. as far as the albumartist tag field goes (with reference to Settings> Media> Show song and album artists) you can have one off (singular) artists appear or not appear in your artist node for example, but how would you create a node that only showed those singular artists?
You can do this with a folder type node, which is different to a filter type (those are the ones using the smartplaylist style rules) as it uses an internal path.

xml:
<?xml version='1.0' encoding='UTF-8'?>
<node type="folder" visible="Library.HasContent(Music)">
    <label>Album Artists</label>
    <content>artists</content>
    <order direction="ascending">artist</order>
    <path>musicdb://artists/?albumartistonly=true</path>
</node>

I think that should do what you want.  Note that there is no documentation for these folder type nodes, nor is there likely to be but there are several examples scattered around in the forum.  There are various examples in https://forum.kodi.tv/showthread.php?tid=257378
Learning Linux the hard way !!
Reply
#4
@black_eagle on Question 4 I think you misunderstood.

As

Show song and album artists - on shows all artists from both artist & album artists fields
Show song and album artists - off shows only album artist

what I believe they were asking is whether it was possible to have a artist node that excludes any album artists, so a list that shows any artist that is not also an album artist.

If my interpretation is correct, then I don't believe there is anyway currently to do this.
Reply
#5
Hi again,
It was reading your thread about box-sets @black_eagle that got me looking into the library side of things. I have used the Kodi music section for many years via the files method only (to reflect my windows file system set up) but recently started experimenting with the library section.
I had seen the page that you referred me to @jjd-uk, but had forgotten about it. Unfortunately what is available at the moment and v19 (@black_eagle) seems pretty basic and I don't think really helps me with what I'd like to do. The ability to add/create your own rule fields would be great - in an ideal world! (I think I've been spoiled by foobar2000). Guess I'll just have to stick to my bastardised tags for now, keep experimenting and wait to see what the future brings.

as for my question 4. @jjd-uk, what I was looking for is-
a. all node (Settings> Media> Show song and album artists set to on) - huge list
b. album artist only node (eg. Settings> Media> Show song and album artists set to off) - more manageable list
c. song artist node (or a. minus b.) - more manageable list
Hope that is a bit clearer.

Thanks for your responses.
Reply
#6
@unfaesed I hope I can encourage you to use library rather than file view, do some more experiments. Smile
(2020-05-21, 15:06)unfaesed Wrote: Unfortunately what is available at the moment and v19 seems pretty basic and I don't think really helps me with what I'd like to do.
Smart playlists or filter type custom nodes can do quite a lot, but it is an area I am happy to see expand. We are getting near the point where almost all standard music file tag values are stored by Kodi and useable in filter rules. Also some of the non-standard values offered my Muiscbrainz like releasestatus/TXXX:MusicBrainz Album Status (eg. official, promotional, bootleg, pseudo-release) belong to the album more than the song, and as such could be additional data that scrapers pick up from Musicbrainz or NFO files (with core code and db changed to receive them).

One non-standard (e.g. not in the Id3 v2.4 tag standard or commonly used) tag that Kodi does process from scanning tags from music files is RELEASETYPE/TXXX:MusicBrainz Album Type (eg. album, single, ep, compilation, soundtrack etc). This is stored for albums and referred to in Kodi as type (the name releasetype was already being used for something else)
Quote:...only to find that <rule field="releasetype" does not work
Yes, you used the wrong field name. Try <rule field="type".

Kodi does not necessarily use the names for data that Picard UI does, which also does not match all the tag names anyway. Confusing, but the lack of consistency across systems really isn't Kodi's fault. Have a play with the smart playlist editor and look at what .xsp files it makes as a way to explore.

Picking up custom tags from music files is a feature I have flirted with a bit, but with so few users make good use of even the standard ones it went on the back burner. The equivalent of the video lib tag facility (user can "mark" videos via GUI with custom values, not same as tag reading from music files) is also a possibility, but again such data internal to Kodi only is weak IMO - a lot of user effort for little reward and "poof" it is gone.

Would love to provide a filtering facility as rich (or richer) than Foobar, however the 10ft/controlled by TV remote GUI of Kodi makes that much harder to present to the user nicely. As a data guy I want to empower the user to all the clever filtering a relational db can do, but the UI side is hard within current (and ancient) Kodi GUI engine components.

Also take a look at the music sources facility as a way to transfer any folder structure you have for your music (from using file view) into something the library can filter on. In many ways easier than tagging, you just organise your music files in a way meaningful to you, and add multiple music sources to match.

Filtering song artists that are not album artists - err, sorry no. The db can do it of course, but there is no current way to build such a filter. Using role rules gets part of the way, but the current logic (for implementing A and NOT B as SQL on role data) isn't sophistciated enough (few users would even think to get that far!). I have better as WIP, which may one day see light of day.
Reply
#7
@DaveBlake I get what your saying, trying to get two different systems to work together, past history, everybody wanting to do it there way and why won't it just work? Sounds like the story of the human race.


@DaveBlake wrote
Quote:Would love to provide a filtering facility as rich (or richer) than Foobar, however the 10ft/controlled by TV remote GUI of Kodi makes that much harder to present to the user nicely. As a data guy I want to empower the user to all the clever filtering a relational db can do, but the UI side is hard within current (and ancient) Kodi GUI engine components.

I don't quite get this bit however. Kodi already uses tag fields and rule/filter fields (could you not just add more to each list). It just means the list/s you scroll through with your remote is/are longer. Or do I not understand this?


@DaveBlake wrote
Quote:One non-standard (e.g. not in the Id3 v2.4 tag standard or commonly used) tag that Kodi does process from scanning tags from music files is RELEASETYPE/TXXX:MusicBrainz Album Type (eg. album, single, ep, compilation, soundtrack etc). This is stored for albums and referred to in Kodi as type (the name releasetype was already being used for something else).
Yes I had considered that, give up on release status and put Bootleg under releasetype (I walked away in frustration when I discovered that <rule field="releasestatus" didn't work). My object was to get away from bastardised tags (instead I'd just be exchanging one method for another). Don't think that I've given up however, I shall keep on playing around with it all.

Cheers
Reply
#8
@unfaesed

How to quote text...
Image
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#9
(2020-05-22, 01:22)unfaesed Wrote: Kodi already uses tag fields and rule/filter fields (could you not just add more to each list). It just means the list/s you scroll through with your remote is/are longer. Or do I not understand this?
There is a little more to it, but fundamentally yes adding yet another tag to be read and stored and a matching filter rule is not too hard. However some people feel that the selection lists of sort orders and filter rules are already too long for a 10ft GUI. Too much scrolling and the one you want always at the bottom.

But my comment was mostly because I want to do more to improve filtering than just add more fields and have ever longer lists. I want to make filtering more dynamic (the side balde filter is so slow if you have a larger library, and the smart playlists/custom nodes too fixed) and work across all levels of navigation - sources, genres, years, albums, artists, songs. DB side I have nailed, it is GUI that challenges.
(2020-05-22, 01:22)unfaesed Wrote: My object was to get away from bastardised tags (instead I'd just be exchanging one method for another).
Yeap, I would support that.

Basically what you want is to have Kodi process releasestatus/TXXX:MusicBrainz Album Status (eg. official, promotional, bootleg, pseudo-release) in both tag scanning and additional album info scraping. Since all my music is "official" it never crossed my mind that was useful data, and no one else has ever asked for it AKAIK. Fundamentally yes it could be added to v19, just feeling twitchy about those long selection lists.

Instead albums have styles, themes and moods (all scraped as additional info ) which I have yet to find a user that uses (doesn't mean that they don't of course). Another dirty approach (no core Kodi changes needed) would be to modify a Python album scraper (or even an xml one if you have the regexp skills) to scape the release status and stick it in "theme". But I am not suggesting that, just having an idle thought!!!
Reply
#10
@DaveBlake I understand where you're coming from with the GUI side of things. Just a thought but have you considered a system for the filtering like the Kodi settings levels (Basic; Standard; Advanced; Expert) or maybe some sort of sub menu system for various levels (only go deeper if you want to).
As for styles, themes, moods never have and no doubt never will use those. Genre is a highly subjective tag that I will probably never use now that I'm removing information (bootleg; compilation; live etc) from it.
Just remember, you can't please all of the people all of the time (some of the people some of the time is hard enough). As for Python the only ones I know have no legs and scales.

Cheers
Reply
#11
@unfaesed Figured that tag might come in useful for others (plus other users can put any value they like in it rather than just the musicbrainz supplied ones) so I implemented it. https://github.com/xbmc/xbmc/pull/17990 Once (if) it gets merged then you will be able use that tag in smartplaylists and nodes.  In a node, the field will be albumstatus.

Your library would need re-scanning for Kodi to pick up the tag values from the files though with a full tag scan.  That's assuming it gets merged of course.
Learning Linux the hard way !!
Reply
#12
Note that xsp filters are also used by skinners for setting dynamic content, so its not just for end users.

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix see: Aeon MQ5 Mod Matrix release thread
Nexus see: Aeon MQ5 Mod Nexus release thread
Aeon MQ 5 skin and addon repo 11.1.0
Reply
#13
@black_eagle That's good to hear, cheers, should make things easier!
Reply

Logout Mark Read Team Forum Stats Members Help
custom music nodes0