Kodi Community Forum
v18 Custom Nodes - specifically how can I make my music video collection accessible - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Music Support (https://forum.kodi.tv/forumdisplay.php?fid=263)
--- Thread: v18 Custom Nodes - specifically how can I make my music video collection accessible (/showthread.php?tid=340801)



Custom Nodes - specifically how can I make my music video collection accessible - Nedorus - 2019-02-13

I'm new to this forum and to Kodi, so please be kind  Nerd

Sorry if this is in the wrong category. My question is not specific to meta data providers but it seemed closest. @Mods: Please feel free to move where you feel it best fits.

Now to my question:
I'm trying to create a custom menu structure which lets me filter down in several steps to what I'm looking for.
e.g.
When going into the "Music" top level menu (should also work for Music Videos etc.) I would like to see the following items:
 - all
 - genre
 - artist
 - album
 - year

I choose "genre" and it will show me all the genres in my library
 - all
 - rock
 - pop
 - classic

I choose "rock" and it should show a further selection of
 - All
 - artists
 - albums
 - years

I choose "artists" and it will list me all the artists that have songs with genre "rock" as that is where I'm currently at.
 - All
 - Amaranthe
 - Evanescence

I choose an artist (e.g. Amaranthe) and it should show 
 - albums
 - years
 - all

I choose "albums" it should list all albums that are by Amaranthe AND have tracks in the "rock" genre
 - All
 - Helix
 - Massive Addictive

... and so on until I arrive at a filtered list of tracks.

If I choose a different "path" (e.g. artist->genre->album) things should work the same way.

So in effect Kodi should ask me four questions (maybe more or less for other categories like videos, movies etc.):
1. genre?
2. artist?
3. year?
4. album?
and I want to be able to answer them in any order by following "different paths" in the menu structure (e.g. "genre->year->artist..." vs. "year->artist->genre->...") 
Also I want to be able to "not answer" a question or skip all further steps/questions by choosing "All" (= no restriction)

Obviously, as my library grows (it's already rather large) I do not want to manually add new genres/artists/years etc. to this structure, this should be done automatically.

How would I go about this?

I've already read:
https://kodi.wiki/view/Add-on:Library_Node_Editor
https://kodi.wiki/view/Video_nodes
https://kodi.wiki/view/List_of_boolean_conditions
https://kodi.wiki/view/Smart_playlists
etc. 

but somehow I can't get the dots connected ...


RE: Custom Menu Structures - Karellen - 2019-02-13

Moved to Music.


RE: Custom Menu Structures - DaveBlake - 2019-02-15

I would also like the kind of multi-directional navigation and cross-node filtering that you describe but currently Kodi library GUI, although configureable, is not capable of everything you would like. It is also questionable that a UI intended to be controlled from a TV remote will ever have that intricacy of control, maybe a future refactor will go that way I just don't know.

My current preferred solution is to use Yatse to browse my music library, it can so some things that Kodi UI can't e.g. Album > Artist, song > Album, song > artist, and supports richer dynamic filtering. Fingers on a tablet or phone are also more agile than TV remote arrow buttons,  I suggest you try it and see.

 
Quote:Obviously, as my library grows (it's already rather large) I do not want to manually add new genres/artists/years etc. to this structure, this should be done automatically.
Yes of course. The music library is populated by scanning the tags embedded in music files - you can not add/remove/modify genres, artists or years explicitly, Kodi will use what it finds in the music files.


Let's also comment on what Kodi GUI can do.
Kodi music library GUI is based upon having nodes that have content of either genres, artists, albums or songs. There are two types of node definition (held as an .xml file)
- folder type where the properties of the node are defined using a virtual path
e.g.   <path>musicdb://artists/?genre=rock&amp;albumartistonly=true</path>
- filter type where the properties of the node are defined using smart filter rules.

Most of the default (fundamental) nodes are folder type, they carry any options to the next level in navigation. You can create your own nodes of folder type but understanding what virtual path and options work is an expert user activity.

The filter type nodes do not carry their options to the next level in navigation, but they use smart playlist rules so are easier to understand and create.

Generally navigation direction goes:
genres > artists > albums > songs,
sources > artists > albums > songs
years > albums > songs
roles > artists > albums > songs

The default genres node shows all the genres, the default artists node all the artists (there is a setting which toggles between seeing all song and album artists or just the album artists), the years node all the years, and the songs node all your songs. However I would advise again looking at all your songs in a long list - it is slow to display and better to use the library to filter what you want to see than look at a huge list.

Genres node
Click on a genre and you see all the artists with songs of that genre.  Click on an artists an see all the albums by that artist with songs of that genre, or can choose "* All artists" to see all the albums with songs of that genre. Finally click on an album and see all the songs on that album with that genre, or on "* all albums" to see all the songs on all the albums by the artist with that genre.  Pretty much what you ask for except for year, years does not form part of that navigation tree.

You can possibly achieve some of the other thngs you want using the filter on the side blade (although this can be slow on some large libraries because it trying to requerty dynamically as you add filter values). For example years > artists, start at years node and pick the year. Then on side blade filter pick album artist(s) - it will only show those with songs on albums of that year.
 
Quote:How would I go about this?
I would say scan some accurately tagged music files into the library and have a play with the default node structure, and do same with Yatse. As I said at the beginning it can not currently do all you want, but it can do enough (I hope). I think custom nodes and smart playlists are too static for what you would like to achieve

My own dream music library UI would offer much as you describe:
  • The ability to easily and dynamically set a combination of filter rules e.g. source, genre, year, artist, mood, (partial) artist name etc. that apply across every thing I then view (artists, albums, songs, genres, sources, years).
  • The ablity to move between the current thing and other things "like" it, where I can easy pick what I mean by like e.g. same genre, artist, year, source, mood, label, etc.
  • Sorting by whatever combination of fields I choose
  • Presets for all the above for my favourite ways of viewing my library

The db could easily do it, getting the UX to do it (while still supporting the current UI) is harder. Maybe one day, but while I personally prefer listening with TV off  putting too much work into Kodi UX is not really a task that attracts me Smile

And if you would like to read a long discussion of other people's "how to navigate library" ideas (and what I thought about them) see https://forum.kodi.tv/showthread.php?tid=300052


RE: Custom Menu Structures - Nedorus - 2019-02-16

First, thank you so much for the long and thorough reply. Greatly appreciated.
However it's not what I had hoped to hear  Sad

I use kodi to play music videos and totally dont care about playing music on it as I have a Sonos system for that anyway.

So, filter type nodes don't carry over what I have selected to child nodes, right?

So that leaves me with folder type nodes, right? You said:
Quote:Most of the default (fundamental) nodes are folder type, they carry any options to the next level in navigation.
So how would I write a filter for just two levels, let's say genre->year

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="0" type="folder">
    <label>Genres</label>
    <content>musicvideos</content>
    <match>all</match>
    <icon>some_icon.png</icon>
    <group>genres</group>
</node>
So this should give me the music videos grouped by genre, no?

I've tried several methods to create a "folder"-type node but they are always empty. I tried following this wiki instruction but with no success...


RE: Custom Menu Structures - DaveBlake - 2019-02-16

Music videos.... oh well I'm not the guy for that. All the things that I mentioned applies to music, and music videos are half way between music and videos with UI navigation based on video side of things. Maybe one of the music video enthusiasts (@HomerJau ) will come and give some advice.

What I am sure of is that nothing navigates genres > years, just not how it works.

You quoted xml is not a valid folder type node, just adding type="folder" does not make it so, fields like <content> and <group> belong to filter type only.

The default music videos menu has a (video) genres node library://video/musicvideos/genres.xml/ that will list your music video genres, and then the  music videos for a selected genre. Have you not seen those?

Just a thought: have you actually added music videos to your video library? These nodes only appear when you have done that, so maybe that is why you are asking the questions you are.  I don't know but I suspect something obvious has been overlooked!


RE: Custom Menu Structures - Nedorus - 2019-02-18

@DaveBlake Thanks again for the kind reply.

Are you saying, that video navigation works differently from music video navigation works differently from music navigation?
That is a very odd design decision to say the least...
I chose the music example in my original post as that is something most people can easily relate to and understand the concept. I assumed that it would work the same for music videos.

Yes I have added my music videos to my library. And it has been a pain as for some odd reason music video meta tags (mkv and mp4) aren't read from the files... another odd design decision as far I'm concerned. I had to write a script to add .nfo files for each and every one of them. Fortunately I use MediaMonkey as my media management system and that let's me easily create such scripts.

My issue is, that going from genre to song/video with ten-thousand-odd videos in a handful of genres isn't really an option as that makes an average of 2000 videos to scroll through to find what I want... and selecting groups of vids and adding them to a "now playing" playlist as in "play all of these" isn't going to work well either.

Since obviously I need to be talking music video details (because they are handled differently from music / videos) I'll go into the details:
I have the following "genres":
PV/MV (read "promotional video" or "music video"; mostly mp4-format with h.264 - MPEG-4 AVC video and AAC audio full meta-tags according to mp4 container definition)
Live (for concerts, usually containing lots of chapters; mostly mkv-container with h.264 - MPEG-4 AVC video and A.52=AC3 audio, full meta-tags and chapters as defined by the Matroska open standard)
Making of (mostly mkv-container with h.264 - MPEG-4 AVC video and A.52=AC3 audio, full meta-tags and chapters as defined by the Matroska open standard)
Twitter Clips (mostly mp4 format h.264 - MPEG-4 AVC video and AAC audio full meta-tags according to mp4 container definition)
YouTube Clips (odd formats but mostly mp4 as well; meta-tags according to mp4 container definition where possible)
(yes, I know that these are not strictly genres, but I use the "genre" meta tag as that what fits best and is available across the different formats)

There are around 130-140 artists in my collection.
There are music videos in my collection going back about 20 years

I can't say what the average number of albums is per artist, but considering that usually one album will contain 2-4 videos (at least PV/MV and Making of, sometimes different versions of the PV/MV or a live track), I'd estimate there are around 3000 albums in my collection.
(BTW: my music library is MUCH larger and I have no trouble navigating it with what Sonos provides out of the box, even though that is not customisable)

So, what is Kodis approach to navigate a music video library like this? There must be some way to get multi-level filtering/navigation, no?

I'd be happy for ANY kind of solution...

P.S.: Since we are at it, is there a way to get rid of the "random artist", "random music video" and "unseen music video" sections? I really don't care for those...


RE: Custom Menu Structures - DaveBlake - 2019-02-18

I am saying the specifics of video library (in music videos) navigation works differently to music library.  For example music goes genres > artists > albums > songs, but videos go genres > videos. Is that really so surprizing? Anyway that is what it does.
 
Quote:Yes I have added my music videos to my library. And it has been a pain as for some odd reason music video meta tags (mkv and mp4) aren't read from the files... another odd design decision as far I'm concerned.
I think tag support for videos has been added in v18. It is not as if there has ever been a active descison to preclude such a thing, simply history. Video library came first, and most then (and now) are not tagged so NFO files were used istead. Music does have a history of metatdata, so music library was implemented to take advantage of them. Finally music video support was added as an after thought as a kind of video with some properties in common with music. If someone wants to extent that support then they are free to volunteer their skills and time, it just has not happened yet.
 
Quote:My issue is, that going from genre to song/video with ten-thousand-odd videos in a handful of genres isn't really an option as that makes an average of 2000 videos to scroll through to find what I want...
I understand the problem.  Unfortunately the side blade filter doesn't offer much (anything??) for videos, so my music suggestions won't work. I have extended the filter options for music to make it a useful dynamic filtering feature, I guess no one has bothered to do the same for the video library.

You can make smart playlists (or filter type custom nodes) based on say genre and year rules, but that will mean manual effort creating a custom node for each combination so not ideal.

Perhaps someone else may have some suggestions for you, if they have lots of music videos I'm sure they have had similar problems.

I have edited the thread title to maybe attract someone with an answer for musicvideos


RE: Custom Nodes - specifically how can I make my music video collection accessible - Nedorus - 2019-02-19

@DaveBlake Thanks again for the open answers.

Sorry if it sounded like I did not appreciate all the effort that went into Kodi. I do, really!
This sometimes happens when I get frustrated and I start complaining. I shouldn't though. It's all free Software and you Devs put in your personal time to provide it to us.

I guess I need just to lower my expectations a little  Wink

That said, I wish I could support in helping out with coding ... but as it stands it would probably take ages for me to even understand the least little bit of what's going on behind the curtain... So I'd probably be of little use/help.

thanks again for the support. I'll probably script something from my MediaMonkey library to create the Smartplaylists/Filters.


RE: Custom Nodes - specifically how can I make my music video collection accessible - scott967 - 2019-02-22

Hello. I currently have about 5000 music videos with 2400 artists represented on my system.  Some thoughts:

1.  In Kodi 18, there is some tag reading from mp4 and mkv files.  To get it you have to enable in settings/media/videos/use video tags (default is off -- must be at settings level advanced or expert).

It doesn't read every possible tag -- I didn't do the work and only suggested adding the mp4 tags I was interested in.  I don't use mkv for music videos.

2.  Kodi can show your music video library in two different windows -- the music window and the videos window.  The actual library is part of the video library and so inherits much of the characteristics of videos.  Keep in mind for some users a "music video" is a movie-length concert, not just a song.  Different skins may show things differently for music videos when viewed in the music window as compared to the videos window.  When you open the info for a music video, it opens the movieinformation dialog, not the songinformation dialog (as of Kodi 18).  Again, different skins will handle that differently.

3.  Kodi will cross-reference music video "actors" (artists) to the music library, so if the artist exists in the music library you can display at least the artist thumb.  Unfortunately this cross-reference doesn't also work for albums, so you can't just show the album thumb (you can use the poster to store a cover, but it depends on how skin chooses to show posters for music videos).  Music videos also can have (on by default) a "thumbnail" that is extracted by Kodi as a screenshot from the video.

4.  I use smart playlists to manage (filter) music videos.   You don't get all the navigation options but a good filter on a playlist helps a lot.  My skin can assign a specific playlist to a menu or submenu on the home window, or you can also use the context menu on a playlist to create a "favourite".

5.  Kodi can also create a "mixed" playlist of songs and musicvideos and these can be loaded and played from either the music or videos window.  I don't see a real use case for this, but it's there.

scott s.
.


This forum uses Lukasz Tkacz MyBB addons.