From d8815898b8dff9bee76e891a01c2156d04551a1a Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Tue, 28 May 2013 23:37:04 -0700 Subject: [PATCH] fix for undefined TRACK_LENGTH_GRACE Thanks for catching this, @mrmachine. --- beets/autotag/match.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beets/autotag/match.py b/beets/autotag/match.py index f771945d3..85097a592 100644 --- a/beets/autotag/match.py +++ b/beets/autotag/match.py @@ -425,7 +425,8 @@ def _recommendation(results): # Track length differs. if rec > max_rec['tracklength'] and \ item.length and track_info.length and \ - abs(item.length - track_info.length) > TRACK_LENGTH_GRACE: + abs(item.length - track_info.length) > \ + weights['track_length_grace'].as_number(): rec = max_rec['tracklength'] # Track number differs.