Aunique failing to disambiguate?

Figured I’d ask here, since some of you probably have run into this already.

For albums, beets.io is not disambiguating correctly. I think I just typo’ed the config, but don’t see the error. I’m importing 2 releases of the same album:

https://musicbrainz.org/release/7ebdeccf-58e9-4176-a9e7-c817ab9388b6
https://musicbrainz.org/release/763ce3d8-f183-4628-b1d5-baa057a7da72

… and I am expecting disambiguation to trigger on import. However it fails and attempts to merge the two albums. I can re-rip the CD’s but I don’t believe that is the issue since they are 100% matches if I just spot check each one.

My disambiguation setup looks like the following:

default: $albumartist/$album%aunique{albumartist album,albumtype year label catalognum albumdisambig, ()}/$disc-$track $title

Am I missing something completely obvious here?

Hmm, looks about right from here.

Some things to check:

  • Is anything different if you use just plain %aunique{}?
  • What’s the output of beet ls -a for these two albums in your collection? (Showing this alongside beet ls -p would be useful too.)
  • You’ve run beet move (probably with a query to select just those albums) after changing your path config, right?

Not a problem. I haven’t imported the second album yet, as it will always attempt to merge them.

Two example albums used:
https://musicbrainz.org/release/fc735a33-25b2-4e1e-affb-5afb56455bf4
https://musicbrainz.org/release/173c23ff-ea2f-470a-8a92-6e8677a5ea9f

Output of imported albums:
beet ls -a stereophonics have a nice day
Stereophonics - Have a Nice Day

Output of items path:
beet ls -p stereophonics have a nice day
/data/media/music/Stereophonics/Have a Nice Day/01-01 Have a Nice Day.mp3
/data/media/music/Stereophonics/Have a Nice Day/01-02 Surprise.mp3
/data/media/music/Stereophonics/Have a Nice Day/01-03 Piano for a Stripper (demo).mp3

Attempting to import (original config):

beet import /import/Stereophonics/Have\ a\ Nice\ Day\,\ Part\ 2/

/import/Stereophonics/Have a Nice Day, Part 2 (3 items)
Correcting tags from:
    Stereophonics - Have a Nice Day, Part 2
To:
    Stereophonics - Have a Nice Day
URL:
    https://musicbrainz.org/release/fc735a33-25b2-4e1e-affb-5afb56455bf4
(Similarity: 97.8%) (album, tracks) (2001, GB)
 * Have a Nice Day (Acoustic)             -> Have a Nice Day (live) (acoustic) (title)
 * Heart of Gold (Neil Young Cover)       -> Heart of Gold (live) (acoustic) (title)
 * I Stopped to Fill My Car Up (Acoustic) -> I Stopped to Fill My Car Up (live) (acoustic) (title)
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates? A
This album is already in the library!
Old: 3 items, MP3, 192kbps, 11:18, 16.7 MiB
New: 3 items, MP3, 192kbps, 13:32, 19.0 MiB
[S]kip new, Keep both, Remove old, Merge all? S

Here it is with the updated config (just using aunique{}):

beet import /import/Stereophonics/Have\ a\ Nice\ Day\,\ Part\ 2/

/import/Stereophonics/Have a Nice Day, Part 2 (3 items)
Correcting tags from:
    Stereophonics - Have a Nice Day, Part 2
To:
    Stereophonics - Have a Nice Day
URL:
    https://musicbrainz.org/release/fc735a33-25b2-4e1e-affb-5afb56455bf4
(Similarity: 97.8%) (album, tracks) (2001, GB)
 * Have a Nice Day (Acoustic)             -> Have a Nice Day (live) (acoustic) (title)
 * Heart of Gold (Neil Young Cover)       -> Heart of Gold (live) (acoustic) (title)
 * I Stopped to Fill My Car Up (Acoustic) -> I Stopped to Fill My Car Up (live) (acoustic) (title)
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates? A
This album is already in the library!
Old: 3 items, MP3, 192kbps, 11:18, 16.7 MiB
New: 3 items, MP3, 192kbps, 13:32, 19.0 MiB
[S]kip new, Keep both, Remove old, Merge all? S

So it seems there is no change. Additionally, moving the imported album with aunique set to what you suggested does not change the existing directory (e.g. add disambiguation).

Aha—you’ll just want to choose “Keep both.” Then you’ll have both albums and %aunique will kick in.

1 Like

Ah, I was missing something completely obvious. Using the [K]eep option made the import and aunique work as intended. Thanks for the help!

1 Like

What I think is happening is that your albums are identified as two different releases of the same release group. Since the two releases are of the same group and probably have the same name and contain the same recordings, I don’t know how beets choses among them but it might be pretty random, so on your first try they were identified as two different releases of the same group and on your second try as the same. Have you tried to disambiguate them by release group rather than release? (Beets doesn’t store the release group name but it stores it’s musicbrainz ID, and most generally to disambiguate between two entities their musicbrainz IDs are the best choice, since it’s made for this job)