library: show album id in empty album error

This makes it possible to recover from this case, as you can correct
whatever caused it, by either fixing album ids on tracks or removing the
empty album id.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
This commit is contained in:
Christopher Larson 2019-07-15 07:20:37 -07:00
parent 00ac5928c1
commit 959a058458

View file

@ -1119,7 +1119,7 @@ class Album(LibModel):
"""
item = self.items().get()
if not item:
raise ValueError(u'empty album')
raise ValueError(u'empty album for album id %d' % self.id)
return os.path.dirname(item.path)
def _albumtotal(self):