From 469c03a7bfc43957d5e4f768fbc363f06ec04240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Sat, 15 Jul 2017 01:13:18 -0400 Subject: [PATCH] deal properly with empty album titles --- beetsplug/lyrics.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index 42ddef025..17c226589 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -713,10 +713,12 @@ class LyricsPlugin(plugins.BeetsPlugin): ''') output.write(u'\n') if album != item.album: - album = item.album - output.write(album.encode('utf-8')) + tmpalbum = album = item.album + if album == '': + tmpalbum = 'Unknown album' + output.write(tmpalbum.encode('utf-8')) output.write(u'\n') - output.write(u'-' * len(album)) + output.write(u'-' * len(tmpalbum)) output.write(u'\n') output.write(u'\n') title_str = u':index:`' + item.title + u'`'