v18 Filter music by media source - a new way to select what to play
#1
Music 
Introducing a new music library facility to filter artists, albums and songs by media source.

This new feature provides support for users to divide their music into any arbitrary sub-collections that have meaning for them, in a way that is independant of music file tagging, file naming or what is in artist or album NFO files. It is something I have have wanted since I first started using Kodi, I hope that others will be equally excited about it and support my efforts to improve Kodi in this way Smile

I know that users find it much easier to put music in a folder than edit tags or NFO files. With the introduction of the Artist Information Folder for local art and NFO files, we are liberated from having to keep music under unique artist folders (containing all the music by that artist and only that artist),  so there is no reason not to arrange albums phyisically in a folder hierarchy that matches how the user accesses their music. Categorising music by putting it under separate folders is a very natural thing to do, for example you could have folders for "Classical Music", "Kids stuff", "Party Music", "those old tapes I ripped", "Why did I buy this" etc.,  or large collections such as "Rolling Stone 500 Greatest Albums of all time", the possibilities are endless.  But until now Kodi did not make it easy to pick music using its physical location other than by using fileview (and not having all the other library advantages), or making custom nodes based on path rules etc. (and having to burrow into the GUI to access it).

This new feature makes use of adding separate media sources as an easy way for the user to identify these different music categories or collections. Maybe, especially if all your music is on one physical drive, you have only ever added one music source, but adding music sources does not have to be done an entire drive at a time, each music source can be a folder, or even multiple separate folders, and folder can be included in more than one souce. Adding a music source makes a great way for the user to specify that the music in this folder (or these folders) is my <whatever you like> music.

Having done that source, much like genre, is offered as a filter rule in smartplaylists and custom nodes,  and on the more dynamic  (but under used?) media filter dialog available in standard skins on the sideblade for artists, albums and songs. There is also a new sources default library node, that lists the music sources (that have been scanned into the library) and, again like genre, clicking on a source navigates to the list of artists with music on that source, and then the albums on that source by that artist.

I think this is particularly useful for those with large and diverse music collections, or when genre alone is not enough to divide the library into easily accessible chunks. But can you can try it out with more modest size libraries too.

The PR is yet to be reviewed, tested and approved, see https://github.com/xbmc/xbmc/pull/14012, so it would be a great help if those of you with an interest in the music library, and perhaps a use for this kind of facility, could try the test build 20180610-166b5650-PR14012

How to get started:

A clean installation is probably best, it will have the new library node. Then add some music sources - divide your albums in some meanigful way - and scan to library. Then explore the new sources node, filter dialog on artists, albums and songs, or make yourself some smart playlists.

[But you can also try out with an existing (upgraded) library assuming that you alreday have multiple music sources. Db gets bumped to v72, and you will still need to rescan tags, even though music  files have not changed, to see the source stuff work. And need to add own node is you have customised your library menu layout]

Let me know what you think.
Reply
#2
Thanks! Tested and works as expected (I see the individual sources under a new "sources" node), but i'm still a little unsure of what this brings. We still have to add individual sources right?

As far as I can tell this is just listing the music sources under a new node? Or am I missing something entirely? Smile

EDIT: Ahh now we have a source in the DB I can see the new possibilities... I've been using path rules to basically do the same thing for a while Smile
Image Image
Reply
#3
This is a great new feature @DaveBlake. Thanks for spending the time on this!!

This is my understanding (for the benefit of other members that may want to discover it)

I can now group my albums in a manner that makes sense to me and, because of all the work you did on the Artist Folder, we are no longer constrained to using a strict Artist>Album>Song structure. So these are my Sources...
Image


I can navigate my Library using the Sources node shown in the image below. This is like navigating your normal library, but only based on a particular source. So your partner does not have to see your music and can see his/her own music for example
Image


I can create Playlists based on a Source.
Image


I can filter my full library to show either Albums, Artists or Songs from a particular Source...
Image

Image

Image

Happy days ahead!!
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
#4
(2018-06-11, 11:53)docwra Wrote: As far as I can tell this is just listing the music sources under a new node? Or am I missing something entirely? Smile
Sources node:
It may list the same names as the fileview (assuming that all your music sources are scanned into the library), but then the sources node can be used to navigate library in ways that fileview can not do. Having a traditional artist/album folder layout makes the two look more similar than they really are.

But also note that this is just an initial GUI implementation. In the furture I hope to implement a kind of "super filter" that can be set and then apply across all nodes. Having a sources node is just a side effect really of having a list of sources to select from come up when creating smartplaylist filter rules.


(2018-06-11, 11:53)docwra Wrote: EDIT: Ahh now we have a source in the DB I can see the new possibilities... I've been using path rules to basically do the same thing for a while
Yes, if you are clever you could have done some of this before manually with path rules, but holding source data in the db, and using "add media source" to provide GUI makes it much easier for all levels of user.
Reply
#5
It might be useful to provide ListItem.Source and MusicPlayer.Source infolabels. 

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix see: Aeon MQ5 Mod Martix release thread
Leia see: Aeon MQ5 Mod Leia release thread
Reply
#6
(2018-06-13, 02:01)scott967 Wrote: It might be useful to provide ListItem.Source and MusicPlayer.Source infolabels.
I thought about that, and decided I would see if there was any skinner interest first. Are you thinking for the artist/album/song info dialog, or the nodes in general?

The first is very easy, the nodes a bit more complicated as it means adding sources to the views and then, because it is in the view, reworking the way the filter clauses are built. That would possibly slow down the already slow larger nodes, and a silly thing to do if most skins are not actually showing the data. A way around would be to denormalise the data, as is done for artist names or genres etc., but again over kill if the data is rarely seen. So you can see why, for minimal impact on those that don'twant this feature, I have not taken this route yet.
Reply
#7
I'm assuming the user hasn't applied a filter.  I see "source" as an attribute of a song that could be shown on the song info dialog, in lieu of (on in addition to) path and filename.  But I see in your implementation that source is an attribute of an album.  I was thinking in terms of something like a "lossless" source and a "lossy" source, which might have duplicate albums.  So maybe more useful in album info or in addition to song info.

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix see: Aeon MQ5 Mod Martix release thread
Leia see: Aeon MQ5 Mod Leia release thread
Reply
#8
I've had some time on my hands to play with this today. The biggest value for me is using it in smartplaylists so I can separate what I like from what wifey likes. The filter works in smartplaylists with songs, albums and artists but not with mixed content.

There's an added bonus to that. As many modern skins use smartplaylists as skin widgets I can already filter what to show on the home screen under music. On my PC I opt to show excerpts from my modern music, leaving classical and jazz for when I feel like browsing for something deliberately. On my wife's PC I can show her Japanese stuff which personally I also don't need to see.

So I can just "hack" my favourite skin and replace the smartplaylist for a certain widget with one customized by me. Good stuff. It's just a bit painful to lose the files when the skin gets updated and having to remember to replace them again.
Reply
#9
Ah, this is great! I just got a new sound system and started up an audiophile collection. Great to be able to separate out my High Rez stuff to a Sub Category! I know this is old but it's great! Thank you!
Reply
#10
Yup, that was a nice improvement. It would be even greater if we could filter in smartplaylists by Bits per Sample, Samplerate (just the rounded factors 44, 48, 88, 96, 172, 192 and 2,8 MHz) and number of channels Blush
Reply
#11
It would be a great way of filtering.  However, smartplaylists work with information contained in the database and samplerate, bits per sample and number of channels are derived from the currently playing song.  You could probably derive that info with ffmpeg when scanning the tags in order to be able to add it, but I think that would have a major speed impact on an initial scan.
Learning Linux the hard way !!
Reply



Logout Mark Read Team Forum Stats Members Help
Filter music by media source - a new way to select what to play0
This forum uses Lukasz Tkacz MyBB addons.