Stats only count albums in the database

Items might have the `album` field set without belonging to an album in
the beets database. We only count the albums that are represented in
the database.
This commit is contained in:
Thomas Scholtes 2014-08-25 11:34:40 +02:00
parent 9e2b6d0253
commit 2d2c84b505

View file

@ -1197,7 +1197,8 @@ def show_stats(lib, query, exact):
total_items += 1
artists.add(item.artist)
album_artists.add(item.albumartist)
albums.add(item.album)
if item.album_id:
albums.add(item.album_id)
size_str = '' + ui.human_bytes(total_size)
if exact: