Skip to content

Commit

Permalink
Merge pull request #2962 from jams2/master
Browse files Browse the repository at this point in the history
Add space-padding to missing tracks dialog
  • Loading branch information
sampsyo committed Jun 20, 2018
2 parents 5763679 + 68590e1 commit a62e4ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 9 additions & 2 deletions beets/ui/commands.py
Expand Up @@ -378,15 +378,22 @@ def format_index(track_info):
len(match.info.tracks),
len(match.extra_tracks) / len(match.info.tracks)
))
pad_width = max(len(track_info.title) for track_info in
match.extra_tracks)
for track_info in match.extra_tracks:
line = u' ! %s (#%s)' % (track_info.title, format_index(track_info))
line = u' ! {0: <{width}} (#{1: >2})'.format(track_info.title,
format_index(track_info),
width=pad_width)
if track_info.length:
line += u' (%s)' % ui.human_seconds_short(track_info.length)
print_(ui.colorize('text_warning', line))
if match.extra_items:
print_(u'Unmatched tracks ({0}):'.format(len(match.extra_items)))
pad_width = max(len(item.title) for item in match.extra_items)
for item in match.extra_items:
line = u' ! %s (#%s)' % (item.title, format_index(item))
line = u' ! {0: <{width}} (#{1: >2})'.format(item.title,
format_index(item),
width=pad_width)
if item.length:
line += u' (%s)' % ui.human_seconds_short(item.length)
print_(ui.colorize('text_warning', line))
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.rst
Expand Up @@ -14,6 +14,8 @@ New features:
and Winamp.
Thanks to :user:`mz2212`.
:bug:`2944`
* Added whitespace padding to missing tracks dialog to improve readability.
:user:`jams2`

Fixes:

Expand Down

0 comments on commit a62e4ef

Please sign in to comment.