Closed the-confessor closed 4 years ago
By default, beets uses files' metadata to align tracks. (The metadata includes track lengths, but those can vary to a suprirrisng degree and are somewhat unreliable alone.) It works by trying to find the minimum-cost matching in a bipartite graph formed by your current tracks the the data from MB. When you don't have any metadata, the assignment algorithm doesn't know what to do and behaves unpredictably.
Perhaps notably, it does not use filenames at all by default. To that end, have you tried the fromfilename
plugin, which can (if you're lucky) guess some metadata from filenames?
I will look into the fromfilename plugin as a workaround. I could also try using the acoustic fingerprinting plugin, though I was having trouble getting that working last I tried.
If the assignment algorithm behaves unpredictably for untagged files would it make sense to take a different approach for untagged files? Sorting the files alphabetically then aligning them to tracks based on index may not always be correct, but at least it is predictable.
Perhaps. It's a little harder than it seems, however, because we don't currently have any representation of a state that means "untagged files," and it would take significant plumbing to mark music that is truly devoid of tags and handle them with a completely separate matching strategy.
Good to know. I will explore workarounds, then.
I've run into an issue a handful of times when importing a set of completely untagged files.
I run a beets import, provide a MusicBrainz release ID, but Beets appears to not be able to figure out how to order the files.
The files will be named such that, when sorting alphabetically, they appear in the same order as on the release.
In some cases of multi-disc releases I have tried keeping all the files in one folder, as well as creating one subfolder per disc, and the results are the same.
A specific example that I have not found a practical workaround for -
Importing this release, the first few lines of the preview we immediately see a track mis-match:
For some reason here it is trying to map track 13 of disc 3 into track 2 of disc 1. This is just the first example - the import is full of similar mis-matches.
I have confirmed that the files are named correctly. Track 13 of disc 3 and track 2 of disc 1 are not even the same length.
I'm a little puzzled about how beets is choosing the order to import these files. Alphabetical order seems like it would be an intuitive thing to do. Even matching by track length alone would get a more accurate import than I am seeing.
Can anyone provide any insight? Any suggested workarounds?