diff --git a/headphones/webserve.py b/headphones/webserve.py index 118416d6..fce57cfb 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])