beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.78k stars 1.82k forks source link

Adding albums that have the track order wrong? #2265

Closed krompus closed 5 years ago

krompus commented 7 years ago

Sometimes, I would like to import an album, but I find that the track order is incorrect, although all tracks are present. Is there a way to get beets to recognise this, and reorder the tracks based on filename?

sampsyo commented 7 years ago

That's odd. Any chance you have the chroma plugin (acoustic fingerprinting) enabled? If so, is there any chance the tracks are actually mislabeled and beets has the order right?

Beyond that, you might give the edit plugin a shot to provide manual feedback.

krompus commented 7 years ago

Ah, I didn't have chroma enabled. I'm having some problems getting it to work, but I'll update when I do; that should resolve this issue.

pblocz commented 7 years ago

The same thing happened to me:

Tagging:
    Stephen - Sincerely
URL:
    https://musicbrainz.org/release/5d82f7b2-9154-4a4f-90b2-385161f45a95
(Similarity: 61.5%) (tracks) (Digital Media, 2016, US)
 * Start a Fire.mp3                  -> Start a Fire (title)
 * Mr. Man.mp3 (#1)                  -> Your Life (#2) (title, index)
 * Remembering Myself (#0)           -> Remembering Myself (#3)
 * Line it Up.mp3 (#1)               -> Line It Up (#4) (title, index)
 * Fly Down.mp3 (#0)                 -> Fly Down (#5) (title)
 * Solid as a Stone.mp3 (#1)         -> Solid as a Stone (#6) (title, index)
 * Solid as a Stone (Outro).mp3 (#1) -> Outro (#7) (title, index)
 * Your Life.mp3 (#1)                -> Mr. Man (#8) (title, index)
 * Crossfire (#1)                    -> Crossfire (#9) (index)
 * Sincerely.mp3 (#1)                -> Sincerely (#10) (title, index)
Apply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, plaY?

In my case, I found that it was a problem with track's tags and beets.autotag.match.track_distance().

Using pdb I checked items in assign_items() (that calls track_distance) and found that they weren't tagged properly:

(Pdb) p list(map(lambda t: t.title, items))
['Crossfire', '', '', '', 'Remembering Myself ', '', '', '', '', '']

(Pdb) p list(map(lambda t: t.track, items))
[1, 0, 1, 1, 0, 1, 1, 1, 1, 1]

And for both tracks that failed to match, the length was 244 and 246 seconds respectively.

I don't know if it is the same case, but it could be possible to use item's file names if title tag is not present as an addicional test.

sampsyo commented 7 years ago

For that, you might give the fromfilename plugin a try.

arcresu commented 5 years ago

It sounds like the scenarios discussed here are solved by the chroma and fromfilename plugins, so I'll close this. If you disagree please feel free to reopen to discuss specific ideas for how we can do better.