Expand description
Which spellings of a name are the same person, decided before any of them becomes an entity.
§The problem, and its two halves
The catalog builds an artist per normalised name, so a library holding
Ozzy Osbourne on one album and O. Osbourne on another holds two
musicians. Every count, every listing and every page is wrong by one, and no
amount of comparing the two strings can fix it safely: matching on a
fragment of a name would merge Angus Young with Neil Young, which is worse
than the fault it cures.
The half that has an exact answer. A great many libraries have been
through Picard, and those files carry MUSICBRAINZ_ARTISTID. Two
spellings under one identifier are not a resemblance to be judged — they are
the same artist, said so by the only authority there is on the question.
That half needs no heuristic at all.
The half nobody outside can answer. Old rips, downloads, a friend’s
drive: nobody on earth knows that a particular O. Osbourne is Ozzy except
the person whose disk it is. So the program does not guess — it asks, with
aede merge, and keeps the answer in user.json beside everything else
that was said rather than derived. doctor suggests pairs worth looking
at and applies none of them.
Both halves arrive here, and they are resolved together rather than one
after the other, for the reason in aliases.
§Only where the pairing is unambiguous
A tag may name several artists at once, and the identifiers arrive as their
own list: artist may be one string that crate::text::split_artists
turns into two names, while MUSICBRAINZ_ARTISTID holds two values in an
order nothing guarantees to be the same. Pairing them by position would
attach an identifier to whichever name happened to sort first.
So a file speaks only when it names exactly one artist and exactly one identifier. That covers the overwhelming majority of tracks, and it is never a guess. The rule this program follows everywhere: several equally good answers are refused rather than arbitrated.
A spelling seen under distinct identifiers is ambiguous and cannot establish automatic aliases. The local artist key remains the normalised name, so two people with exactly the same spelling still share an ambiguous local row; their other spellings must not merge merely through that homonym. An explicit owner choice can still join those spellings.
§Which spelling survives
Where a person has said so, the one they named. Otherwise the one that names
the most tracks, ties broken by the normalised key so that two runs over one
library answer alike. Either way it is a key that already existed, so
merging can only ever shrink the set of keys: anything filed under the
surviving key in user.json or sources.json keeps pointing at it.
Structs§
- Chosen
- What the owner of the disk says, for the files no identifier can answer for.
- Said
- What one file says about one artist, when it says it unambiguously.
Functions§
- aliases
- Reads the aliases out of everything the scan saw and everything the owner said.
- filed_
as - The name a spelling is filed under: its alias, or itself.
Type Aliases§
- Aliases
- The name every spelling of one artist is filed under.