From 4b836ee2c4c0a6fe852de0b832a11fb6b18b0673 Mon Sep 17 00:00:00 2001 From: Patrick Speiser Date: Thu, 4 Oct 2012 01:08:03 +0200 Subject: [PATCH] Fixed bug where "Delete empty artists would delete artists where we have tracks but the latest album is not set because the artist was added directly for a single album --- headphones/webserve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headphones/webserve.py b/headphones/webserve.py index 66c5b47d..c6e7c0e3 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -194,7 +194,7 @@ class WebInterface(object): def deleteEmptyArtists(self): logger.info(u"Deleting all empty artists") myDB = db.DBConnection() - emptyArtistIDs = [row['ArtistID'] for row in myDB.select("SELECT ArtistID FROM artists WHERE HaveTracks == 0 OR LatestAlbum IS NULL")] + emptyArtistIDs = [row['ArtistID'] for row in myDB.select("SELECT ArtistID FROM artists WHERE HaveTracks == 0")] for ArtistID in emptyArtistIDs: logger.info(u"Deleting all traces of artist: " + ArtistID) myDB.action('DELETE from artists WHERE ArtistID=?', [ArtistID])