Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement request: Leverage Musicbrainz RELEASETYPE tag when present to inform album browse #879

Closed
audiomuze opened this issue Apr 9, 2023 · 88 comments

Comments

@audiomuze
Copy link

audiomuze commented Apr 9, 2023

LMS currently includes all albums where an artist makes an appearance in a long list sorted by the sort criteria selected by the user.

The end result is that the listing blends together Albums, EP's, Singles, Appearances, Compilations and Various Artists albums, diminishing the ability to quickly find an item of interest where an artist has many entries. As an example browsing Don Henley:
image

LMS already reads the RELEASETYPE tag from files when present, but does not leverage the information.

image

Leveraging it would enable LMS to present albums in a more structured fashion e.g:

  • Albums
  • Compilations
  • EP's
  • Singles
  • Appearances
  • Various Artists

Doing so would significantly enhance the user experience, particularly where an artist has many entries within a user's album collection.

@audiomuze
Copy link
Author

Implementing the suggestion above will enable the above presentation to be turned into something akin to this:

Screenshot 2023-06-18 101155

Screenshot 2023-06-18 101241

Screenshot 2023-06-18 101334

Thoughts from others?

@erspearson
Copy link

I have a ton of singles for some artists and I'd love to stop them drowning out the album view.

How can I help? (goes to blow dust off the camel book...)

@michaelherger
Copy link
Member

michaelherger commented Sep 29, 2023

Would one of you have a bunch of sample files with different release types in them? Feel free to strip the audio. All I'm interested in is a few files of (possible) different types (Flac, mp3,...) and release types.

https://www.dropbox.com/request/T3RctyzGgNg0oFDubq6a

I can't find RELEASETYPE or the like on https://docs.mp3tag.de/mapping/. Would anybody know the actual tag name?

@michaelherger
Copy link
Member

Some of the steps I could imagine:

  • extend database schema "albums" with a "release type" column, and likely
  • store release type info in that column
  • extend browse modes to filter by that column

I believe this should be feasible. Not as a plugin, though, it would have to be implemented in the core of LMS.

One of the issues that might crop up: the release type comes with each track file. What if the release type varies between the various tracks of an album? Would you create multiple albums of different type? Would you assign all tracks to the same album, using the release type of the first track scanned?

@erspearson
Copy link

I could generate some files but I don't have any to hand. It's a bit 'chicken and egg', I've never considered tagging with releasetype as LMS makes no use of it. I do all my tagging in my own data preparation scripts (in Perl) and that just uses metaflac to add the tags to the files so that should be easy.

On the album/track relationship - well that's as old as LMS, I guess - scanning has always tried to recreate the upper levels of the schema from the track files. In my setup the track-album-artist relationship is present in my folder structure. And then again in Music Collector which I use for the master catalogue. Users of MusicBrainz get its artist/release/recording/track hierarchy flattened into a a set of UUIDs tagged into every track.

So my feeling would be that tags like releasetype will have originated higher up in some data model external to LMS and flattened into a set of track files from which LMS is attempting to reverse engineer the higher levels. LMS can reasonably assume that they are therefore consistent across track files (as a result of the external denormalization).

From your options above about inconsistent sets then I'd go for considering the album ID as the combination (tuple) of album title and release type. A set of tracks with all the same 'album' title but different release types would generate distinct 'albums' that surface separately in the UI. I can't think of a real world example just now but I bet there exists an album on which there is a track that has the same title as the album and that was also released separately as a single (including also a B side or remixes not present on the album).

@audiomuze
Copy link
Author

audiomuze commented Sep 30, 2023

Would one of you have a bunch of sample files with different release types in them? Feel free to strip the audio. All I'm interested in is a few files of (possible) different types (Flac, mp3,...) and release types.

https://www.dropbox.com/request/T3RctyzGgNg0oFDubq6a

I can't find RELEASETYPE or the like on https://docs.mp3tag.de/mapping/. Would anybody know the actual tag name?

If you give me till Monday I’ll be able to upload examples for you, which will reflect Picard tagging and thus most closely map to musicbrainz.

Mapping info is here:

https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html

image

@audiomuze
Copy link
Author

One of the issues that might crop up: the release type comes with each track file. What if the release type varies between the various tracks of an album? Would you create multiple albums of different type? Would you assign all tracks to the same album, using the release type of the first track scanned?

If any tracks in an album have differing release type data then it’s the tagging that’s poor and I’d use the release type of the first track. One thing you will encounter is that tracks can have multiple release types: https://beta.musicbrainz.org/doc/Release_Group/Type

Ideally there would be a config option in LMS where a user defines the release type entries they want LMS to group albums by. This way the user gets to have LMS behave in a way that meets their needs/tagging schema.

There’s also the question of handling artist appearances in albums by other artists and in Various Artists albums. I’ll paste some screen shots on Monday demonstrating how that’s been handled elsewhere.

@erspearson
Copy link

One thing you will encounter is that tracks can have multiple release types

I don't see anything on that page suggesting that a track can be tagged with more than one release type.

Ideally there would be a config option in LMS where a user defines the release type entries they want LMS to group albums by.

I'm happy to keep things simple and just let the set of tag values found drive the behavior.

Would anybody know the actual tag name?

It's here for various file types:
https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html#id32

Extend browse modes to filter by that column

Yes, browse modes would be a flexible way of using this.
For me, having a couple of extra sort order options in the artist and album modes would be my main interest.
I generally favour"Artist, Year, Album". I'd imagine "Artist, ReleaseType, Year, Album" being my new favourite as I'd see a chronological list of Albums (uncluttered by singles) followed by a chronological list of just the singles. I do appreciate this would need to be done on a skin by skin basis.

@audiomuze
Copy link
Author

audiomuze commented Oct 2, 2023

I don't see anything on that page suggesting that a track can be tagged with more than one release type.

I’ve seen plenty in the wild tagged directly via Picard, when I get home I’ll pull a list of all the distinct combos I’ve come across.

Right, pulling a list from my own library this is what's been added by Picard (there's been no hand involved in this, so it's purely what's come from musicbrainz):

album
album\\audio drama
album\\audiobook
album\\compilation
album\\compilation\\dj-mix
album\\compilation\\live
album\\compilation\\soundtrack
album\\demo
album\\dj-mix
album\\live
album\\live\\soundtrack
album\\remix
album\\soundtrack
anthology
broadcast\\audio drama
broadcast\\live
compilation
compilation\\demo\\ep
compilation\\ep
demo\\ep
ep
ep\\live
ep\\remix
ep\\soundtrack
live
other
remix\\single
single
single\\interview
single\\live
single\\soundtrack

@audiomuze
Copy link
Author

audiomuze commented Oct 3, 2023

Would one of you have a bunch of sample files with different release types in them? Feel free to strip the audio. All I'm interested in is a few files of (possible) different types (Flac, mp3,...) and release types.

@michaelherger I've uploaded flac and mp3 examples of album and ep. In both cases the PW is mherger

@michaelherger
Copy link
Member

Are you saying there can be multiple values, and they're separated by backslashes?... Would you want them to be available by all of them? Or top level (first) only?

Would any of the sample files you sent me have multiple values? I've only seen single types so far (album or ep).

@audiomuze
Copy link
Author

audiomuze commented Oct 3, 2023

Would any of the sample files you sent me have multiple values? I've only seen single types so far (album or ep).

I'll upload one that has multiple values.

Are you saying there can be multiple values, and they're separated by backslashes?

Ignore the backslashes, they're just a delimiter used when tags are imported into a SQLite table. But yes, I am saying there can be multiple values based on what I've seen pulled from Musicbrainz via Picard.

... Would you want them to be available by all of them? Or top level (first) only?

If one adds an album to MusicBrainz it provides for a Primary and Secondary releasetype.

Primary:

  • Album
  • Single
  • EP
  • Broadcast
  • Other

Secondary:

  • Audio Drama
  • Audiobook
  • Compilation
  • Demo
  • DJ-mix
  • Field recording
  • Interview
  • Live
  • Mixtape/Street
  • Remix
  • Soundtrack
  • Spokenword

If one then has a look over at Discogs the list of Formats (their releasetype) is endless.

If one considers how music is traditionally released:

  • Album
  • EP
  • Single
  • Promotion
  • Bootleg

Then when one sets aside what the likes of MusicBrainz and Discogs use, I think there's merit in letting users define which RELEASETYPE values they'd like to use to break an artist's work into discrete sections. This would provide them with the flexibility to control how an artist's work is broken into discrete sections within LMS.

All of this belies an underlying complexity in that the fundamental problem we are trying to solve is distinguishing between an artist's:

  • Albums
  • Compilations
  • EP's
  • Singles
  • Appearances
  • Various Artists

Doing so would mean having to evaluate RELEASETYPE as well as incorporate the existing logic that LMS uses to include appearances in albums where the artist is not the albumartist as well as Various Artists albums.

So ideally, when one selects an artist to browse one would want to see sections returned, and if that we not possible in the construct of how LMS operates and interacts with its front-ends, one long list (as we have it today) but showing:

  • Albums
  • Compilations
  • EP's
  • Singles
  • Appearances
  • Various Artists

in that order, with each subset of the list sorted by a (universal) sort order the user chooses. The screenshot in my first post illustrates that, albeit I appreciate it may not be possible to present different sections in LMS.

@michaelherger
Copy link
Member

michaelherger commented Oct 4, 2023

You're right that the UI presentation might be the biggest challenge. I have code now which would store the information in the database, and return it in relevant queries. It allows me to create new menus like "Singles" using the "Extended Browse Modes" plugin. And excluding some types from the main "Albums" list should be pretty easy, too.

But how to present the UX for an artist?... As you said the devices are rather limited. We can't have headings, unless we introduce eg. text only items between the various releases. Or we create sub-menus for them.

Maybe @CDrummond would be able to do something smarter/nicer with Material? As you can get the release type as part of the albums query, would you be interested and have ways to have a grouping in an artist's menu implemented?

I could release the changes so far to get the basics tested. Or I push it to a branch I pushed it to https://github.com/Logitech/slimserver/tree/release-type - if you wanted to run LMS from a git clone. Even being able to exclude some release types from the albums list might be helpful for some. Eg. even Spotify would return "Album" or "Single", which would allow me personally to get rid of the singles 😁.

mherger added a commit that referenced this issue Oct 4, 2023
- store `release type` info in database
- add support to create "Extended Browse Modes" based on the release type
- add new `W` tag to relevant queries
@michaelherger
Copy link
Member

I re-read your latest comment about the grouping, @audiomuze. I think what you're trying to achieve goes way beyond the release type, but ventures more into the contributor role field. "Appearance" isn't a release type, but probably defines what a contributor's role was on a publication. This can't be handled using the release type information. So I'll concentrate on what are considered the "Primary" types.

@CDrummond
Copy link
Contributor

@michaelherger I can certainly add sub-menus for this. What I'm thinking of is that if I ask for a list of "albums" and there are multiple release types then I will show a list. e.g.

  • 2 Albums
  • 5 EPs
  • 1 Single

Clicking on each would then show the items of the relevant type. Pretty sure the requester would prefer a mix of headings and items all in 1 list/grid. The issue, however, is adding headers to the grid view would be a major pain - and simply not worth the effor for me. So, I think the above should suffice - and be reasonaby easy to implement.

@michaelherger
Copy link
Member

I plan to have a setting in LMS to not distinguish the release types. In that case you'd only get the type album. Would be nice if in that case no menu was generated 😉. I hope to have something usable for testing, soon.

@CDrummond
Copy link
Contributor

@michaelherger My idea was to only show the menu if there were multiple types. So, only singles the Material would show 1 list (but would show "X Singles" in its toolbar). If your setting as turned off, then there'd be only 1 type (as there is none, so I'd default to album), and no menu would be shown.

...I have a few EPs, but no singles, and no release-type set on any of my collection, so woudl not want this menu showing anyway :)

@audiomuze
Copy link
Author

I think what you're trying to achieve goes way beyond the release type, but ventures more into the contributor role field. "Appearance" isn't a release type, but probably defines what a contributor's role was on a publication. This can't be handled using the release type information. So I'll concentrate on what are considered the "Primary" types.

@mherger, you're right that it goes beyond what's achievable using only release type.

Whether or not you end up focusing only on the Primary types I think users that would want to use this feature would benefit greatly from the ability to define a delimited list of release types they consider to be primary for their purposes. It might default to something, but having the ability to add/remove other values would embed an ability for user's specific preferences to be met.

When one enters an artist view through LMS or Material's main menu by clicking on an artist name somewhere in the interface I'm guessing there's a SQL albums query being run that returns all "albums" where that artist has a contributor role, sorted by album and year, or whatever the user has last used as sort criteria. Would it not be possible to include the contributor role in addition to the release type and return one list sorted by Primary type and then the contributor roles pertaining to album artist, appearances and various artists

In my mind's eye I was envisaging appending the results of a series of queries to a temp table and then returning the records from that temp table. In this way the queries could incrementally append the matching records to the temp table first adding say: Album, Compilation, EP, Single, Bootleg, Appearances, Various Artists, with each subset ordered by the order that LMS would currently use. That would mean front-ends would not need to create sub-menus nor in fact (worst case) do anything with the list other than display it in the order received. For front-ends that wanted to they could parse the results and insert headers, extra space or whatever they felt appropriate in order to "split" the presentation.

Having sub-menu's would to my mind be counter to how users would typically want to explore music. Having one long list would be preferable, even if it didn't differentiate between types but only presented the list ordered by type.

@CDrummond
Copy link
Contributor

For front-ends that wanted to they could parse the results and insert headers, extra space or whatever they felt appropriate in order to "split" the presentation.

Add headers to Material's list is easy. Adding it to the grid, not (easily) possible - each row in the grid needs to be the same height, and large headers would look stupid.

Having sub-menu's would to my mind be counter to how users would typically want to explore music. Having one long list would be preferable, even if it didn't differentiate between types but only presented the list ordered by type.

I would not want one long list with some weird sorting, so sorry not going to happen that way in Material. But anyhow, this discssion does not belong here.

@michaelherger
Copy link
Member

@audiomuze I think you got a point in that we can currently query albums for a contributor's role, but we don't expose the role in the response. That's probably something else which should be feasible.

That said the frontends would still require work to expose that new feature (if it got implemented). Maybe there could even be a plugin completely taking over the artist album menu. Hmm...

@michaelherger
Copy link
Member

A former SB team buddy at some point mentioned he'd never want to work in UI design, because there are as many opinions as there are people in a discussion 😂.

mherger added a commit that referenced this issue Oct 4, 2023
- store `release type` info in database
- add support to create "Extended Browse Modes" based on the release type
- add setting to ignore release type information (to behave as before the change)
- add setting to ignore certain types from the "Album" browse menu
- add new `W` tag to relevant queries
mherger added a commit that referenced this issue Oct 4, 2023
- store `release type` info in database
- add support to create "Extended Browse Modes" based on the release type
- add setting to ignore release type information (to behave as before the change)
- add setting to ignore certain types from the "Album" browse menu
- add new `W` tag to relevant queries
@michaelherger
Copy link
Member

@audiomuze you said

I'll upload one that has multiple values.

Could you please do so? While I think I've got @erspearson mostly covered (getting rid of unwanted singles in the album list), I'm not sure about how to deal with multiple values. Starting with the lack of knowledge how they would come along.

@audiomuze
Copy link
Author

audiomuze commented Oct 4, 2023

@audiomuze you said

I'll upload one that has multiple values.

Could you please do so? While I think I've got @erspearson mostly covered (getting rid of unwanted singles in the album list), I'm not sure about how to deal with multiple values. Starting with the lack of knowledge how they would come along.

@michaelherger. Done. Same as before.

How they come about is users ctrl-click different selections from the primary and secondary releasetype dropdowns when adding albums to MusicBrainz. From a tagging perspective they'll appear exactly as any other multi-value tag.

@michaelherger
Copy link
Member

Great! Here's what LMS is reporting ("Show Tags"):

RELEASETYPE: [ album, compilation, soundtrack ]

"compilation"... that was already causing headaches before I tried to implement MB release types 😂.

But you'd also want to be able to group by "soundtrack", I guess? that would require even more database work. We'd likely have to introduce another table, very much like the genre_track or contributor_album tables to represent the m:n relationships. What a nightmare 😖.

@CDrummond
Copy link
Contributor

Not sure how "soundtrack" is a release type? Looks more like a genre to me. album, compilation, single, EP, etc, yes - but soundtrack?

@michaelherger
Copy link
Member

Yeah, if you look at https://beta.musicbrainz.org/doc/Release_Group/Type then you'll see that most of the secondary types are not exactly what you'd consider a release type. But it's what they've decided to use...

@audiomuze
Copy link
Author

Don’t be bound by MucicBrainz choices, let the user decide what values in releasetype matter to them. When I referenced ‘Compilation’ here it’s based on the presence of that string in releasetype, not some underlying logic that determines whether or not an album is deemed a Compilation or VA album in LMS’s scanning/ database logic.

mherger added a commit that referenced this issue Oct 11, 2023
mherger added a commit that referenced this issue Oct 11, 2023
…a role, eg. after drilling down from a "Conductor" menu.

Fix icon display in the Default web UI.
Show tracks in "Composer" section if they're part of a compilation.
@CDrummond
Copy link
Contributor

Probably out of scope for this ticket, but could the "albums" CLI command be extended to return the track count and total duration for albums? This way if a user has not added release types then a client can at least attempt to guess the type - e.g. 3 tracks or less (and under X minutes) is a single, 5 tracks or less (and under Y minutes) is an EP? (Exact figures to be determined). Or even better, LMS could auto-assign this if no release_type explicitly set.

mherger added a commit that referenced this issue Oct 12, 2023
- store `release type` info in database
- add support to create "Extended Browse Modes" based on the release type
- add setting to ignore release type information (to behave as before the change)
- add setting to ignore certain types from the "Album" browse menu
- add new `W` tag to relevant queries
mherger added a commit that referenced this issue Oct 12, 2023
mherger added a commit that referenced this issue Oct 12, 2023
…a role, eg. after drilling down from a "Conductor" menu.

Fix icon display in the Default web UI.
Show tracks in "Composer" section if they're part of a compilation.
@michaelherger
Copy link
Member

Not easily. Those queries already are pretty complex. And we already do join the tracks table for certain options. So most likely we'd have to run another query against tracks separately to get those counts.

I was wondering whether this could be another feature of the MAI plugin: post process the library data at the end of the scan to manipulate release types based on some rule set. That way the evaluation would happen at scan time, rather than on request. Very much like the genre replacing I've implemented.

Let's take this to another channel. The topic incidentally came up in the Qobuz thread on the forums, too. And with it the topic about how definition of release types wasn't clearly defined (what's a single vs. EP vs. album?).

@CDrummond
Copy link
Contributor

@michaelherger Adding it to MAI, or even just to LMS (why would it need to be in a plugin?) as a post-scan option sounds like a great idea, after all it is not going to change at run-time. But, yeah, this is probably the wrong place for this discussion.

@terual
Copy link
Member

terual commented Oct 12, 2023

I have not followed the whole discussion, so I am not sure if it is needed: if there is any need for new icons for the traditional web-ui, please let me know. I will be able to create some new ones.

@michaelherger
Copy link
Member

Hi @terual - thanks for the offer! I'm indeed using some icons in those menus. But there's no distinction between the various release types etc. Don't know how you'd picture album vs. single vs. EP? And that's only a few types we know of so far...

@terual
Copy link
Member

terual commented Oct 13, 2023

Hi @terual - thanks for the offer! I'm indeed using some icons in those menus. But there's no distinction between the various release types etc. Don't know how you'd picture album vs. single vs. EP? And that's only a few types we know of so far...

I will try some ideas that I have and will see if I can come up with something usable. While I am at it, do you know if there some more icons missing in the menus?

@audiomuze
Copy link
Author

audiomuze commented Oct 14, 2023

@michaelherger
Copy link
Member

That's interesting... in particular the 10 minutes per track distinction by Apple.

I clearly have albums which would be considered EPs to either of their criteria. But I didn't notice they labeled them as such (I'm only using Spotify). I'll double check.

@audiomuze
Copy link
Author

audiomuze commented Oct 18, 2023

image

@michaelherger, regarding the Compositions listing, any chance you could:

  • Include Sort options to sort by:

  • Title, Performer, Year

  • Performer, Title, Year

  • Year, Title, Performer

  • Year, Performer, Title

  • Include the album name in the listing

  • Provide a way for a front-end like Material to display an album cover thumbnail

  • Remove the Composer entry as its superfluous when browsing Compositions by an artist except when there are additional composers attached to the track

@CDrummond, hopefully you're planning on adding the Composition browse to Material?

@michaelherger
Copy link
Member

Please submit this as an independent feature request. Sounds like a few minor and one not so minor changes, combined into quite a task...

@mherger
Copy link
Contributor

mherger commented Oct 27, 2023

Let's consider this done. Thanks guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants