[MUSIC] Genre listing and Albums
#1
Saw this asked the other day, but I haven't seen the thread in the music section and I haven't been able to get it to work so thought I would ask !!

When using nodes to list by Genre, the default behaviour is to list all artists with whatever genre, and then albums of those artists.

Is it possible to skip the artist listing and just generate a list of albums associated with a particular genre (based off the album artists genre) ? I had a play with the xml for the genres node but failed to get it to work. I guess I could do it with smart playlists for each genre that I want, but I'm looking for a method of using all the genres Kodi has read in.

Cheers.
Learning Linux the hard way !!
Reply
#2
[I'm sure I posted how to do this somewhere.......Ah, early burblings here http://forum.kodi.tv/showthread.php?tid=235785 when I was new to Kodi and still green Smile]

You could use a smart playlist for each genre, but it would give you slightly different results from the filter type custom node if all the songs from an album do not have the same genre(s).

You can also drill down from the list of artists with songs of a certian genre using the "* all " that optionaly appears at the top of the standard node (if you aren't seeing that then there is a system setting).

You can also create custom nodes that go straight to albums with songs of the genre....
But you want something that automatically creates such nodes for each genre, that may need some Python

I know you don't mind experimenting Black_eagle, so have a play with custom nodes with

Code:
<node type="folder">
<path>musicdb://genres/6/-1/?genreid=6</path>

where 6 is an example genreid
Reply
#3
Here maybe?

http://forum.kodi.tv/showthread.php?tid=257378

If you do find out post it in that thread Smile
Reply
#4
Someone else is also asking this

http://forum.kodi.tv/showthread.php?tid=275293
Reply
#5
(2016-05-21, 10:19)zag Wrote: Someone else is also asking this

http://forum.kodi.tv/showthread.php?tid=275293

Could you move that thread over to this forum please @zag
Reply
#6
Yes, I'm aware that I could write a smartplaylist where genre='whatever' and that that would work. However, what I want to do is alter the default genre node behaviour.

I thought that this would work, but it doesn't.

PHP Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="1" type="folder" visible="Library.HasContent(Music)">
  <label>135</label>
  <icon>DefaultMusicGenres.png</icon>
  <content>albums</content>
  <path>musicdb://genres/</path>
  <group>genres</group>
</node> 

Even though <content> is set to albums, it lists artists.

What I want to achieve is to select a genre and then produce a list of albums for all album artists with that particular genre, rather than list all the artists and then drill down to an album from one of those. In this respect, the actual artist is irrelevant really given that I want to produce a list of albums (from all the corresponding artists) that fit the genre I have chosen.

What I don't want to have to do is limit this genre selecting by writing either nodes or smartplaylists that each link to a specific genre. I would rather modify the current default behaviour of listing ALL genres and being able to drill down to a list of albums (as explained above).

Hopefully that makes sense. Confused
Learning Linux the hard way !!
Reply
#7
Yes, <content> has no meaning when you also have <path> tag for a type="folder" node.

I get what you want to do (and don't) I think, see my edited post above.

Genre at a time you can do this as a node too

Code:
<?xml version='1.0' encoding='UTF-8'?>
<node order="1" type="folder">
<label>Country  Albums</label>
<icon>DefaultMusicGenres.png</icon>
<path>musicdb://albums/?genre=Country</path>
</node>

But I know that is not the automatic behaviour for each genre that you really want.
Reply
#8
@DaveBlake, Reading your 'early burblings' I guess I am wanting something very similar, just without the extra selection of the 'all' part. i.e. that bit to happen automatically. I note that the original node does not have a path specified in it, just a <group>genres</group> tag at the end. Changing the <content> tag to 'albums' from 'artists' ( with the original node) also doesn't work. I presume it is the group tag that tells Kodi I want to view the genres ?
Learning Linux the hard way !!
Reply
#9
I'm picking through the code for this Black_eagle....

As a self-reminder: CLibraryDirectory.GetDirectory shows that type="filter" nodes must have a <content> tag (and then treated as a playlist and appropriate tags used for rules etc.), while for type="folder" only <path> tag is used and must be present, other tags are ignored.

For a type="filter"node CSmartPlaylistDirectory.GetDirectory populates the items that appear on the screen for a node, and the virtual URL assocated with each that tells Kodi what to do when you click on it. And yes you are right the <group> tag is used to set that URL to musicdb://genres. Although there has to be a <content> tag, what it contains does not actually have any impact.

CMusicDatabase.GetItems then creates items with values like m_strPath = "musicdb://genres/5" which in turn get interpreted when you click on a genre item as the path of a folder type node. This decodes are arists with songs of genreid = 5.

What you want is to optionally populate the genre node items with a path like "musicdb://genres/5/?genreid=5" instead.

Hope that tour of the code was interesting Smile

So in short it means that you can't get what you want without a core code change!
Maybe an addon could do it too, but that's not my field.
Reply
#10
'ello

So this is currently a "no can do"?

My folder structure looks like this:

Artists
...Album

Would altering the folder structure have any impact?

Thanx
Hein
Reply
#11
(2016-05-21, 18:44)hvalbrecht Wrote: Would altering the folder structure have any impact?

No, none. Kodi uses tags not folder hierarchy to populate the music library.

I can say that the remote apps e.g. Kore, Yaste, Offical Kodi Remote for iOS etc. all offer genre>albums rather than the intervening artist level. Ironic really, because I so wish they would add artist! But maybe using t tablet or phone to control what Kodi is playing is an option for you?
Reply
#12
That is what I also thought...

Thanx anyway!
Reply
#13
(2016-05-21, 17:40)DaveBlake Wrote: I'm picking through the code for this Black_eagle....

As a self-reminder: CLibraryDirectory.GetDirectory shows that type="filter" nodes must have a <content> tag (and then treated as a playlist and appropriate tags used for rules etc.), while for type="folder" only <path> tag is used and must be present, other tags are ignored.

For a type="filter"node CSmartPlaylistDirectory.GetDirectory populates the items that appear on the screen for a node, and the virtual URL assocated with each that tells Kodi what to do when you click on it. And yes you are right the <group> tag is used to set that URL to musicdb://genres. Although there has to be a <content> tag, what it contains does not actually have any impact.

CMusicDatabase.GetItems then creates items with values like m_strPath = "musicdb://genres/5" which in turn get interpreted when you click on a genre item as the path of a folder type node. This decodes are arists with songs of genreid = 5.

What you want is to optionally populate the genre node items with a path like "musicdb://genres/5/?genreid=5" instead.

Hope that tour of the code was interesting Smile

So in short it means that you can't get what you want without a core code change!
Maybe an addon could do it too, but that's not my field.

Yeah, the tour of the code was most interesting. Thanks for the insight. So a folder node is produced directly from a path in the db eg 'musicdb://compilations/' therefore content tags make no sense as the content is dependent on the path. Folder nodes apply the same criteria as you drill down though do they not, as opposed to filter nodes that don't ?

(2016-05-21, 18:54)DaveBlake Wrote: I can say that the remote apps e.g. Kore, Yaste, Offical Kodi Remote for iOS etc. all offer genre>albums rather than the intervening artist level. Ironic really, because I so wish they would add artist! But maybe using t tablet or phone to control what Kodi is playing is an option for you?

OK, so if the remote apps can do it, then that must be via a JSON call I guess which would mean an add-on would be totally feasible. Not as smooth as being able to use nodes, but doable.
Learning Linux the hard way !!
Reply
#14
(2016-05-21, 17:40)DaveBlake Wrote: I'm picking through the code for this Black_eagle....

As a self-reminder: CLibraryDirectory.GetDirectory shows that type="filter" nodes must have a <content> tag (and then treated as a playlist and appropriate tags used for rules etc.), while for type="folder" only <path> tag is used and must be present, other tags are ignored.

For a type="filter"node CSmartPlaylistDirectory.GetDirectory populates the items that appear on the screen for a node, and the virtual URL assocated with each that tells Kodi what to do when you click on it. And yes you are right the <group> tag is used to set that URL to musicdb://genres. Although there has to be a <content> tag, what it contains does not actually have any impact.

CMusicDatabase.GetItems then creates items with values like m_strPath = "musicdb://genres/5" which in turn get interpreted when you click on a genre item as the path of a folder type node. This decodes are arists with songs of genreid = 5.

What you want is to optionally populate the genre node items with a path like "musicdb://genres/5/?genreid=5" instead.

Hope that tour of the code was interesting Smile

So in short it means that you can't get what you want without a core code change!
Maybe an addon could do it too, but that's not my field.
A couple of years back I made a change in the scanner file for Minidlna. However, Minidlna is a much simpler music server than Kodi. Anybody knows which file contains the subroutine that populate the database? On the other hand, I also notice that the list years gets populated by albums, why exactly is the behavior different when one use genres?
Reply

Logout Mark Read Team Forum Stats Members Help
[MUSIC] Genre listing and Albums0