Aunique option does not consider catalognum

Hello beets community,

I have a question about the aunique global option. I have configured it as folows, expanding the default keys by label, catalognum and year.

aunique:
    keys: label catalognum albumartist album year
    disambiguators: media albumtype albumdisambig releasegroupdisambig
    bracket: '[]'
paths:
  default: $label/%if{$catalognum,[$catalognum] }$albumartist - $album%aunique{}%if{$year, ($year)}/$disc-$track $artist - $title

My understanding is that beets will now consider two (or more) albums as duplicates when their labels, catalog numbers, albumartists, album and year match.

On import however beets fails to disambiguate these releases:

beets warns me that this album is already in my library.

It seems as if beets will still use the default keys for the aunique option. I expect it however to realize that catalognumber or year or label are different for these releases.

I do not know where I made a mistake in my configuration. Could point me in the right direction please? Thank you so much!

The aunique configuration does not affect duplicate detection; it only affects the %aunique{} template function. There is actually some recent (draft) work on making actual duplicate detection configurable:

It looks like that PR could use some collaboration and feedback, if you’re interested!

Thank you for clarifying my misunderstandig. I will join the discussion at the pull request.