From 34faebfbdb33a7eebe55cf598e1b8aa9e66be2bf Mon Sep 17 00:00:00 2001 From: Tai Lee Date: Fri, 24 May 2013 14:42:00 +1000 Subject: [PATCH] Display "artist" and/or "ID" on RHS of track list in light gray when a penalty has been applied. --- beets/ui/commands.py | 13 +++++++++++++ docs/changelog.rst | 1 + 2 files changed, 14 insertions(+) diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 2af7c86be..21ae2080d 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -280,6 +280,19 @@ def show_change(cur_artist, cur_album, match): rhs += templ.format(rhs_length) lhs_width += len(cur_length) + 3 + # Hidden penalties. No LHS/RHS diff is displayed, but we still want to + # indicate that a penalty has been applied to explain the similarity + # score. + penalties = [] + if match.info.va and track_info.artist and \ + item.artist.lower() not in VA_ARTISTS: + penalties.append('artist') + if item.mb_trackid and item.mb_trackid != track_info.track_id: + penalties.append('ID') + if penalties: + rhs += ' %s' % ui.colorize('lightgray', + '(%s)' % ', '.join(penalties)) + if lhs != rhs: lines.append((lhs, rhs, lhs_width)) elif config['import']['detail']: diff --git a/docs/changelog.rst b/docs/changelog.rst index c388c2871..8951b6113 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -38,6 +38,7 @@ Changelog * Album art filenames now respect the :ref:`replace` configuration. * Friendly error messages are now printed when trying to read or write files that go missing. +* More consistent display and colorization of album and track metadata. .. _discogs: http://discogs.com/