Compilation Albums (and Anthologies)
#1
What are Compilation Albums?
Musicbrainz says this

A compilation, for the purposes of the MusicBrainz database, covers the following types of releases:
  • a collection of recordings from various old sources (not necessarily released) combined together. For example a "best of", retrospective or rarities type release.

  • a various artists song collection, usually based on a general theme ("Songs for Lovers"), a particular time period ("Hits of 1998"), or some other kind of grouping ("Songs From the Movies", the "Café del Mar" series, etc).

So when discussing compilations I also include anthogies i.e. not all compilations are by various artists. Not everyone agrees with this broad view, and that is OK too, I just want to be clear what I am saying.

For songs without Musicbrainz ids Kodi uses the following logic to determine if an album is a compilation:

Code:
1. album name is non-empty
AND
2a. the songs have different artists
OR
2b. all tracks are marked as part of compilation
AND
3a. a unique primary artist is specified as "various" or "various artists"
OR
3b. we have at least two primary artists and no album artist specified.

Otherwise if all the songs have mbids and compilation = 1 tag then the album is stored as a compilation, it does not matter what the song or album artists are. Also note that Musicbrainz will flag anthologies such as Greatest Hits (songs have all the same artist) as compilations, or sometimes use an album artist that isn't "various artists".

This leads to some unexpected behaviour - albums with songs with mbids being taken as compilations when loading the same music files but without mbids is not, and vice-versa.

I would like to adjust the logic when we don't have mbid so that 2b. is sufficient for an album to be flaged as a compilation. All the songs on the album are flagged as compilation then the album is a compilation regardless of what the album artist is.

That is compiltion flag = 1 AND ( 2b OR (2a AND (3a OR 3b)))

It still means that even without the compliation tag being set, and without mbids, if the songs have different artists or "Various Artists" as the album artist then it will be flagged as a compilation. Currently "Various Artists" is a language dependant string and that does cause other issues with multiple profiles in different languages, or when language is changed, taking that as a separate issue to be resolved separately.

But we need to be clear having being a compilation is not synonymous with "Various Artists" (in any language) as album artist; some compilations may have other album artist name(s).
~
Anyone experiencing deja vu I have said this all before here http://forum.kodi.tv/showthread.php?tid=279275

When Are Compilation Albums Listed
The next big question is how the album compilation flag is used to control what is displayed in the various nodes.

There is a Compilations node, that lists those albums with compilation = true. No changes needed there.

But should compilations appear in the albums node? This appeared in the testing thread:
(2016-09-11, 00:10)Andrew-M Wrote: Since Jarvis and now in Krypton I have a problem with my compilation albums showing up under both ”Compilations” and ”Albums”. It used to – and I want it to – only appear under “Compilations”. I made no changes in my library, this happened after updating to Jarvis. I use local information only settings and my files are tagged with mp3tag.de. The tag “Album Artist” is set to “Various Artists” and used to work well before. Did I miss any setting or is there something I need to change in my tags?
I may be having a funny 5 mins, but for the life of me I can't see that Kodi ever excluded compilation albums from the albums node. For a while "Various Artists" was always excluded from the artists node, it is included v16 onward if viewing album artists only. But whatever the past, I believe that the default albums node should include all albums including compilations. For those that want it, it is easy to make a folder type custom node that excludes compilations e.g.

Code:
<?xml version='1.0' encoding='UTF-8'?>
<node order="2" type="folder">
<label>Not Compilation Albums</label>
<icon>DefaultMusicAlbums.png</icon>
<path>musicdb://albums/?compilation=false</path>
</node>

Thinking about it we could do with having "compilation" as a smart playlist rule. I'll add that to my list!

In Jarvis when looking at the albums for an artist you will see also the compilation albums (by "various artists") . There s a long thread discussing this http://forum.kodi.tv/showthread.php?tid=266181 and I hope we can avoid repeats. The upshot is I intend (hopefully sqeeking into v17) to only show those for the artist when the "show album and song artists" flag is enabled, and limit the albums to just those where the artist is the album artist when it is disabled.

Art and NFO Scraping Bug
Mentioning this to remind myself as much as anything as unlikely to fix in v17. There is a recommended work around that the various artist compliations are located in a separate folder that is either added to Kodi as a separate music source and/or named zzz_Compilations see http://forum.kodi.tv/showthread.php?tid=...pid2341616 to avoid artist art or NFO being scrapped from a compilation folder rather than that in the folder for that artist. It is an effect of the overly simplistic dependancy of scrapping artist data on the music by that artist having a unique common folder.

Cheer or boo?
Reply
#2
Query - Why do we have a 'Compilation albums' node if they show under 'artists' and under 'Various Artists' ?

Personally, I'd prefer 'compilations' to only show in the compilations node as I don't agree with the MusicBrainz definition that an anthology is a compilation (and I don't set the compilation flag for anthologies)
Learning Linux the hard way !!
Reply
#3
While I know the Compilation flag is part of the id3 standard, it is however standardised across every tagging software I've ever tried, and I've personally not seen any problem in it being respected where the software supports filtering Compilations. So why can we not respect the compilation flag always for what's shown in the Compilation node, then have a setting that governs what is shown is the other nodes based on whether the Compilation flag is set or not.
Reply
#4
Btw while that definition is correct from https://musicbrainz.org/doc/Release_Group/Type this page https://picard.musicbrainz.org/docs/mappings/ contains:

Quote:For Picard>=1.3 this indicates a VA album; for Picard<=1.2 this indicates albums with tracks by different artists (which is incorrect e.g. an original album with a duet with a feat. artist would show as a Compilation). In neither case does this indicate a MusicBrainz Release Group subtype of compilation.

Which suggests from Picard 1.3 and higher the Compilation flag is only used for VA albums.
Reply
#5
Some cheering, great Smile
If either of you though that you were booing then I have misunderstood.

black_eagle Wrote:Query - Why do we have a 'Compilation albums' node if they show under 'artists' albums and under 'Various Artists' ?
I think that is what you meant.

So you can see all the compilations together? Acting as a filter on the albums node really, although it has been implemented as a separately named node. That makes sense to me, but I don't know the original reasoning.

When looking at albums, not filtered by genre or for an artist but all of them, I would want to see all my albums including the Now 83 etc., listed. If I didn't then I could create a node that excludes them. It seems right to me that we have fundamental nodes artist, albums and songs that show all of those, then we can add nodes with filtering of one kind of another.

Black_eagle you will be able to get things as you want, especially if I add a smart playlist rule then you can use either folder or filter type custom node.

jjd_uk Wrote:So why can we not respect the compilation flag always for what's shown in the Compilation node, then have a setting that governs what is shown is the other nodes based on whether the Compilation flag is set or not.
That is pretty much what I am proposing. Except not yet another setting but a node parameter or playlist rule, and then we can debate what the user gets as default.

Quote:Which suggests from Picard 1.3 and higher the Compilation flag is only used for VA albums.
It might read that way in the mappings, but I can assure you that using Picard I got albums tagged as compilations where the album artist was not VA. Of couse we are not slave to what Picard or Musicbrainz does, it just makes sense to all of us (I think) that if all the songs have been tagged as a compilation then the album is a compilation.
Reply
#6
(2016-09-11, 19:02)jjd-uk Wrote: Which suggests from Picard 1.3 and higher the Compilation flag is only used for VA albums.

Which is what I would prefer and how my albums are tagged. eg Bryan Adams - Anthology is not tagged as a compilation although MB says it should be.

Maybe it's me, but I have no idea why I would want an album by one artist to appear under compilations. If I want to listen to Bryan, I don't want to have to look in compilations to find that album. By the same logic, I don't want to see other albums listed under him that he appears on which are compilations (which is why I have a custom node to exclude them). I understand that not everyone shares my view but as Dave has introduced some new stuff and as nodes are quite flexible, then I'm sure I'll be able to get the view I'm after......One way or another Big Grin


EDIT ~ Just seen Dave's reply before I hit post and it appears that we are both on the same page fundamentally !! Yay !!
Learning Linux the hard way !!
Reply
#7
(2016-09-11, 20:05)black_eagle Wrote: Maybe it's me, but I have no idea why I would want an album by one artist to appear under compilations. If I want to listen to Bryan, I don't want to have to look in compilations to find that album. By the same logic, I don't want to see other albums listed under him that he appears on which are compilations (which is why I have a custom node to exclude them). I understand that not everyone shares my view but as Dave has introduced some new stuff and as nodes are quite flexible, then I'm sure I'll be able to get the view I'm after......One way or another Big Grin

I am all for flexibility so that the user can get what they want, and we do all differ. So I have been listening to your views Smile

Just for interest my use case for separating anthologies (being able to flag albums that are not by various artists as compilations) is that as an avid collector I generally have the original albums that songs appear on as well as the Greatest Hits compilation. I sometimes like to be able to ignore the anthology albums and the duplicated tracks they contain. Other times a splurge of anthology, ignoring the artists album concept and with just the popular stuff, is just what I feel like. For me anthology compilations are much like various artist compilations when it comes to deciding what to listen to.

BTW my use case was not the reason for wanting to take an album with all songs flagged as compilation as a compilation album, but because the inconsistency between how songs with mbid tags and those without were treated.

Quote:EDIT ~ Just seen Dave's reply before I hit post and it appears that we are both on the same page fundamentally !! Yay !!

Yes I think we are. Now all I need is time to do the work.
Reply
#8
I totally get your use case Dave and can see why excluding anthologies would be desirable in that case. I'm aware that Kodi is used in many different ways and I don't envy you one little bit in trying to improve things and keep the majority of users happy.

I don't know if this is feasible or not, but having looked at other areas of development within Kodi, I see things like icon sets being spun off into resource add-ons. This may not be the thread for it but I wondered if it would be possible to do something similar with library nodes. Most users are not power users and will not create a node themselves just to get a specific listing. If they could get a different view from Kodi's repo though, they might well be inclined to try one. I think this could be a way to harness the flexibility that you are building in, without having a bunch of options to set and without having to involve users with writing little bits of code.

Just thinking out loud really and sorry I went off at a bit of a tangent Blush
Learning Linux the hard way !!
Reply
#9
Dave, you've just opened by eyes to new possibilities.

It's not often I have every album by an artist, since I only have albums I can listen to all the way through I might have only have a couple of an artists albums, however there maybe a lot of other songs from that artist that I like that are not on those albums, so a Greatest Hits album might fill in those gaps so I have all the songs I like. However there is still likely to be some overlap between the Greatest Hits album/s and the normal artist albums leading to duplicate tracks.

Having grown up going to a record store I've organised my digital collection in a similar way, so Compliations are filed under Various Artists with the Compilation flag set, and the Greatest Hits albums are filed under the artist. It never occured to me that the compilation flag could possibly be used to either filter in or out the Greatest Hits tracks.
Reply
#10
(2016-09-11, 21:46)black_eagle Wrote: I don't know if this is feasible or not, but having looked at other areas of development within Kodi, I see things like icon sets being spun off into resource add-ons. This may not be the thread for it but I wondered if it would be possible to do something similar with library nodes. Most users are not power users and will not create a node themselves just to get a specific listing. If they could get a different view from Kodi's repo though, they might well be inclined to try one. I think this could be a way to harness the flexibility that you are building in, without having a bunch of options to set and without having to involve users with writing little bits of code.

I think having a custom node repository is a great idea. Smile

At the moment we have a thread where people can submit examples, but that gets messy to navigate and search, and the user still has to do file copying and editing etc. We have the node editor too, and that is very useful. But a library of examples that install themselves at the click of the button would be even more simple.

The only thing is that I'm probably not the guy to create it - nodes yes, the delivery mechanism not so much. Any voulnteers?
Reply
#11
(2016-09-11, 22:57)jjd-uk Wrote: Dave, you've just opened by eyes to new possibilities.

....It never occured to me that the compilation flag could possibly be used to either filter in or out the Greatest Hits tracks.
Yeap Smile
It is becomming a must for playlist rules, meanwhile you can use in the folder type custom nodes.

On another thread http://forum.kodi.tv/showthread.php?tid=290267 SteveG787 came up with this
Quote:is there any reason I can't use the type field to indicate a compilation, or indeed an anthology, and hence use that in a Smart Playlist.

Actually this idea will work too. Albums have a strType (in addition to strReleaseType = "album" or "single") that can be scraped from album NFO files, and it is already available as a playlist rule parameter. Not sure what its original use was, but it seems this is just a field that can be used for any user purpose.

It could well be that strType is a mistake, superceded by strReleaseType, but it is a possibly useful one if you use NFO.
[Note to self: PR https://github.com/xbmc/xbmc/pull/6810 added strReleaseType]
Reply
#12
zag pointed me here, asking about the difference between the "compilation" tag set by MusicBrainz Picard and the secondary type "Compilation" for MusicBrainz Release Groups. I glanced a bit over previous discussion but didn't read it in depth - I'm in an airplane right now and can't quite focus with all the cabin noise - sorry. Smile But yay for complementary on-board wifi!

Anyway, it seems like you have already established what a "compilation" is on MusicBrainz.org. The release group (secondary) type "compilation" is stored by Picard as "release type" (see the tag mapping for what this corresponds to in your preferred audio tagging format).

The "compilation" flag set by Picard is actually a tag adopted from iTunes - AFAIK iTunes introduced this tag and I don't know of any other player/organiser actively using it. iTunes uses the "compilation" flag to make sure that Various Artists releases don't show up all over the place.
E.g., say you only have one song by David Rovics in your collection and that's from some compilation - if that song is tagged with "compilation", it will show up under iTunes' compilation "tab" (or however iTunes does - I don't use it myself), instead of creating a new "tab" for David Rovics and placing the song, on its own, there.

Edit: Oh, and the code for Picard's setting the "compilation" flag can be found at https://github.com/metabrainz/picard/blo...#L317-L318
If any of my comments or contributions have been helpful to you, consider checking out my Patreon. 🙇
Reply
#13
Thanks for that input Freso.

I think it is fair to say that the compilation tag introduced by iTunes has escaped into the wild. It seems sensible for Kodi to process TCMP (ID3) or COMPILATION (Vorbis) etc. as a compilation marker and enable users to filter what they see using it.

So far Kodi has never processed the "release type" tag (TXXX:MusicBrainz Album Type , RELEASETYPE, MUSICBRAINZ_ALBUMTYPE, MusicBrainz/Album Type etc.) returned by Picard, which has "compilation" as a secondary type along with others like "soundtrack" or "live". Do any players actively make use of that tag to your knowledge?

But I just started to look at maybe using that to populate the "type" field in the album table. At the moment that can only be populated from NFO, and other than being availble as a smart playlist rule Kodi does nothing with it. Populating that from tags with "album, compilation" or "broadcast, soundtrack, live" or whatever Musicbrainz has (or users choose to use), seems an interesting place to start. But I would not rush into extracting that an album is a compilation from this tag value too. Picard sets both tags, and expert users could start to use the data in the album.type field in the ways they find best. See what tagging people really have out there, or want to use.

Just to possibly confuse things Kodi has its own internal parameter called "releasetype", this flags if the entry in the album table an "album" or a "single" e.g. a fake album created to cover all the singles by that artist. We must take care not to confuse the two.
Reply
#14
I have a PR changing the compilation logic https://github.com/xbmc/xbmc/pull/10569 but could do with some other people testing it. Mostly to ensure it doesn't break anything.

The changes this provides is
a) that any album with all the song files tagged as part of a compilation e.g. COMPILATION=1, is flagged as a compilation album regardless of the album artist
b) that tagging with album artist as "various artists" in the local language setting is also accepted as the unique album artist of a compilation.

A test build is available here http://mirrors.kodi.tv/test-builds/win32...test01.exe

Edit: now merged so will be in nightlies Smile
Reply
#15
Have also added compilation flag as an "albums" smart playlist rule https://github.com/xbmc/xbmc/pull/10618 so can exclude or limit results to compilations in playlists and filter type custom nodes Smile

Even make a "recently played compliations" node as last played is rule added too.
Reply

Logout Mark Read Team Forum Stats Members Help
Compilation Albums (and Anthologies)0