show filename when title is empty (#213)

This commit is contained in:
Adrian Sampson 2011-06-29 08:35:56 -07:00
parent 7f206baae5
commit 2bc3892384
2 changed files with 6 additions and 0 deletions

2
NEWS
View file

@ -42,6 +42,8 @@
more fairly by the autotagger. For example, if you're missing the
acute accent on the "e" in "cafe", that change won't be penalized.
This introduces a new dependency on the "unidecode" Python module.
* When tagging a track with no title set, the track's filename is now
shown (instead of nothing at all).
* The bitrate of lossless files is now calculated from their file size
(rather than being fixed at 0 or reflecting the uncompressed audio
bitrate).

View file

@ -118,6 +118,10 @@ def show_change(cur_artist, cur_album, items, info, dist, color=True):
if cur_track != new_track:
cur_track = ui.colorize('red', cur_track)
new_track = ui.colorize('red', new_track)
# Show filename (non-colorized) when title is not set.
if not item.title.strip():
cur_title = os.path.basename(item.path)
if cur_title != new_title and cur_track != new_track:
print_(" * %s (%s) -> %s (%s)" % (