Automatically disambiguating singles and albums with the same name with a "single" comment

Tags: #<Tag:0x00007f2a5eab2680> #<Tag:0x00007f2a5eab2540> #<Tag:0x00007f2a5eab2400>

Some artists release an album and a single with the same name (the Future Sound of London’s Lifeforms; Stereo MCs’ Connected).

When this is the case, I’m guessing it’s appropriate to take the least significant recording (the single, not the album) and give it a disambiguation comment of “single”. Indeed, “single” is the 8th most common release_group disambiguation comment, with 46 entries so far. Sure, it’s redundant as the database already knows all this information (and more semantically, at that), but it’s a handy shortcut that can simplify Picard scripts for people who own both and want to keep them separate. They can simply tell Picard “if this release_group has a disambiguation comment of ‘single’, then note that in brackets after its name”:

$set(album,$if($eq_any(%_releasegroupcomment%,single),%album% \(%_releasegroupcomment%\),%album%))

If this is appropriate, then it seems like something that can be automated. A script can periodically look at the entire database, and submit an edit that adds a “single” disambiguation comment, for any single released by an artist who released an album of the same name.

As a proof of method, I imported the database and pulled out a list of candidate release_group global IDs:

mysql> CREATE TABLE release_groups (id int unsigned NOT NULL AUTO_INCREMENT, gid binary(36), name char(128), artist_id int unsigned, release_type_id int unsigned, comment char(128), primary key (id), index (name), index (artist_id), index (release_type_id)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
mysql> LOAD DATA INFILE '<location>/mbdump/release_group' INTO TABLE release_groups COLUMNS TERMINATED BY '	';
mysql> SELECT release_group_single.gid FROM release_groups AS release_group_single CROSS JOIN release_groups AS release_group_album ON release_group_album.artist_id = release_group_single.artist_id AND release_group_album.name = release_group_single.name AND release_group_album.release_type_id = 1 WHERE release_group_single.release_type_id = 2 AND release_group_single.comment = '';

This gives a list of 5865 release_group global IDs of singles that have the same name as albums by the same artist. I believe they would all benefit from being given a disambiguation comment of “single”. Should someone create a robot to do this? Or is this an abuse of the release_group’s disambiguation comment?

If it’s something in Picard, ok maybe.
But we should not add single disambiguation comment in MB.
If somewhere in the site, the release group type is not showing, we should fix the code, not adding a redundant comment to work around.

3 Likes

Huh, that’s interesting, thanks. So what is the intended use of the release group’s disambiguation comment? Looking at the most popular values it has, it’s mostly the names of countries, whether it’s a first or second edition, primary and secondary release group types such as “single” and “demo”, and years. In other words, as far as I can tell, most people are using it to store redundant data for practical purposes. If that’s not what it’s for, then it might need a lot of tidying up in the other direction…

I have Picard automatically process singles separately from albums. I posted all of the relevant code from my file naming script in Repository for neat file name string patterns and tagger script snippets so you might find an alternative there.

4 Likes

Thanks, that looks like a really useful thread!

For now then, I’ve switched from this Picard script:

$set(album,$if($eq_any(%_releasegroupcomment%,single),%album% \(%_releasegroupcomment%\),%album%)) /* Disambiguate different release_groups with the same name by the same artist */

To this:

$set(album,$if($eq_any(%album%,Connected,Lifeforms),%album% \(%releasetype%\),%album%)) /* Disambiguate different release_groups with the same name by the same artist */

So I won’t clutter up the database with “single” release_group comments. Though I do like the idea of what your script does as a semi-related thing…

2 Likes

I have not yet seen this.
I guess if I did I would have queued a remove edit probably, notifying the original editor, of course.

Release group disambiguation is more rare than release disambiguations, but it is that same principle: When metadata is not enough to distinguish (same name and type).

Like LUNA SEA and LUNA SEA or DAVID BOWIE and DAVID BOWIE or even also THE BEATLES.

1 Like

See also the three albums by Weezer called “Weezer” :slight_smile:

3 Likes

Ooh, I forgot about the Weezer example, thanks! Hmm, it sounds like Orbital 2 should really be called just Orbital then, the same as its predecessor…?

1 Like

Ah, thank you! I’ve reverted my edits to Lifeforms and Connected. It sounds like there are a good few dozen other release_groups that could stand to be similarly updated, although that would take a while…

1 Like

It seems so indeed. Comment could be (brown album, a.k.a. “Orbital 2”). Or something like that. :slight_smile:

1 Like

As @jesus2099 points out the Beatles White Album is really just called The Beatles. and already needs a pile of extra disambiguration due to re-releases.

Peter Gabriel called his first four albums Peter Gabriel.

Seal also did the same with his first two.

That rather neat plugin Release Type will add EP and Single to your titles. So answer part of your question.

2 Likes

OK, so now I’m trying to do the opposite of what I initially suggested…

For my personal collection, I’ve written some simple Picard scripts that disambiguate everything necessary by release_type:

$noop(Differentiate different release_groups with the same name and artist_credit, but different types)
$if($and($eq(%albumartist%,Duran Duran),$eq(%album%,Rio)),$set(album,%album% \(%releasetype%\)))
$if($and($eq(%albumartist%,Stereo MC's),$eq(%album%,Connected)),$set(album,%album% \(%releasetype%\)))
$if($and($eq(%albumartist%,The Future Sound of London),$eq(%album%,Lifeforms)),$set(album,%album% \(%releasetype%\)))

And by disambiguation comment only when appropriate:

$noop(Differentiate different release_groups with the same name, artist_credit, and type)
$if($and($eq(%albumartist%,Orbital),$eq(%album%,Orbital)),$set(album,%album% \($lower(%_releasegroupcomment%)\)))

So that’s me sorted. Which just leaves the database. This query:

SELECT CONCAT('* [', artist.name, ': ', release_group.name, '](http://musicbrainz.org/release-group/', release_group.gid, ')') AS list
FROM release_group
CROSS JOIN artist
	ON artist.id = release_group.artist_credit
WHERE LOWER(release_group.comment) IN ('album', 'ep', 'single')
ORDER BY artist.sort_name ASC,
	release_group.name ASC;

…shows which release_groups currently have a disambiguation comment that’s a common release_group_primary_type. That shows that the following release_groups need tidying:

I guess I should start unsetting these release_groups’ comments, with a note suggesting that people who need to differentiate those release_groups in their collection can do so with a script like the above.

And the same then applies to releases and their countries. This script works well:

$noop(Differentiate different releases belonging to the same release_group, but different countries)
$if($and($eq(%albumartist%,BT),$eq(%album%,Movement in Still Life)),$set(album,%album% \(%releasecountry%\)))

So I can similarly unset release disambiguation comments that are just country names. So those comments are only used for things like anniversary editions, CD 1 of a 2 CD set, and so on. Which Picard can then be made aware of with another collection-specific list:

$noop(Differentiate different releases belonging to the same release_group and country)
$if($and($eq(%albumartist%,Jesus Jones),$eq(%album%,Zeroes & Ones)),$set(album,%album% \(%_releasecomment%\)))
$if($and($eq(%albumartist%,Nine Inch Nails),$eq(%album%,Pretty Hate Machine)),$set(album,%album% \(%_releasecomment%\)))
$if($and($eq(%albumartist%,Nine Inch Nails),$eq(%album%,The Downward Spiral)),$set(album,%album% \(%_releasecomment%\)))
$if($and($eq(%albumartist%,Nine Inch Nails),$eq(%album%,We're in This Together)),$set(album,%album% \(%_releasecomment%\)))
$if($and($eq(%albumartist%,Placebo),$eq(%album%,The Bitter End)),$set(album,%album% \(%_releasecomment%\)))
$if($and($eq(%albumartist%,Underworld),$eq(%album%,Dubnobasswithmyheadman)),$set(album,%album% \(%_releasecomment%\)))

I think I’m finally getting somewhere with all this disambiguation malarkey, thanks!

1 Like

I actually think setting a disambiguation comment of “single” in those cases is appropriate. The disambiguation comment is there to allow distinguishing between ambiguous release titles, in case of a single and an album by the same artist sharing the name I see a need for that. IMHO it is secondary that they have already different release types set.

2 Likes

But then we add CD, LP, Cassette, Latin, Japanese, 13 track, Germany, Digital Release, package none and all the other stuff that has a proper field.
We shouldn’t do that, really.

When you search for “Heroes”, you not only tell the type you want but the type will also be displayed.

2 Likes