Importer UI: Display number of missing/unmatched tracks

Fix #1088
This commit is contained in:
Tom Jaspers 2015-02-03 10:23:52 +01:00
parent 9dc123a665
commit 1341ad9b1d
2 changed files with 7 additions and 2 deletions

View file

@ -359,14 +359,18 @@ def show_change(cur_artist, cur_album, match):
# Missing and unmatched tracks.
if match.extra_tracks:
print_('Missing tracks:')
print_('Missing tracks ({0}/{1} - {2:.1%}):'.format(
len(match.extra_tracks),
len(match.info.tracks),
len(match.extra_tracks) / len(match.info.tracks)
))
for track_info in match.extra_tracks:
line = ' ! %s (#%s)' % (track_info.title, format_index(track_info))
if track_info.length:
line += ' (%s)' % ui.human_seconds_short(track_info.length)
print_(ui.colorize('text_warning', line))
if match.extra_items:
print_('Unmatched tracks:')
print_('Unmatched tracks ({0}):'.format(len(match.extra_items)))
for item in match.extra_items:
line = ' ! %s (#%s)' % (item.title, format_index(item))
if item.length:

View file

@ -41,6 +41,7 @@ Features:
properties. :bug:`1287`
* A new ``filesize`` field on items indicates the number of bytes in the file.
:bug:`1291`
* The number of missing/unmatched tracks is shown during import. :bug:`1088`
Core changes: