From cfcac36d133ffd2b59a49182c935ace8ce1c93ae Mon Sep 17 00:00:00 2001 From: redvers76 Date: Thu, 1 Sep 2011 12:06:07 +0200 Subject: [PATCH] Only remove Extras that are flagged as "Skipped" --- headphones/webserve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headphones/webserve.py b/headphones/webserve.py index 27de859f..7aaf7a90 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -90,7 +90,7 @@ class WebInterface(object): controlValueDict = {'ArtistID': ArtistID} newValueDict = {'IncludeExtras': 0} myDB.upsert("artists", newValueDict, controlValueDict) - extraalbums = myDB.select('SELECT AlbumID from albums WHERE ArtistID=? AND Type!="Album"', [ArtistID]) + extraalbums = myDB.select('SELECT AlbumID from albums WHERE ArtistID=? AND Status="Skipped" AND Type!="Album"', [ArtistID]) for album in extraalbums: myDB.action('DELETE from tracks WHERE ArtistID=? AND AlbumID=?', [ArtistID, album['AlbumID']]) myDB.action('DELETE from albums WHERE ArtistID=? AND AlbumID=?', [ArtistID, album['AlbumID']])