diff --git a/beetsstatistics.py b/beetsstatistics.py index 199a279..6fd718f 100644 --- a/beetsstatistics.py +++ b/beetsstatistics.py @@ -407,6 +407,9 @@ def get_albums_not_in_mb(self): raise DBQueryError from e def get_recently_added_albums(self): + """ + Query and return the newest album added to the database. + """ try: cursor = self.get_db_connection().cursor() query = """select @@ -422,7 +425,8 @@ def get_recently_added_albums(self): items i on i.album_id = a.id where - album_id is not null + a.album_id is not null and + a.album != '' group by i.album_id order by a.added desc