Display "artist" and/or "ID" on RHS of track list in light gray when a penalty has been applied.

This commit is contained in:
Tai Lee 2013-05-24 14:42:00 +10:00
parent 1f7a782c01
commit 34faebfbdb
2 changed files with 14 additions and 0 deletions

View file

@ -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']:

View file

@ -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/