Function attachment

Source
pub fn attachment(sources: &Sources, catalog: &Catalog) -> Attachment
Expand description

Counts what this catalog can currently place.

Nothing is rewritten here, and that is the difference with crate::user::reconcile. Annotations are reattached in place because a note whose file moved is lost otherwise, so it is worth guessing from a name and a size when exactly one file matches.

A fetched value is not in that position: it is re-fetchable. A release key carries the folder the album sits in, so moving an album does break the attachment — and the right answer there is to ask the source again, not to guess. Guessing would risk filing what MusicBrainz said about one album onto another to save a network call, which is a poor trade in a layer whose whole promise is that every value can be traced to what it describes.

So a record that does not resolve simply waits, exactly as an imported analysis waits for the file it describes to be scanned.