fix delete query for removing files if a spotify playlist is deleted

This commit is contained in:
chme 2014-12-27 10:00:22 +01:00
parent 647eae17ee
commit 3208315503
1 changed files with 1 additions and 1 deletions

View File

@ -3340,7 +3340,7 @@ db_spotify_pl_delete(int id)
{ {
"DELETE FROM playlists WHERE id = %d;", "DELETE FROM playlists WHERE id = %d;",
"DELETE FROM playlistitems WHERE playlistid = %d;", "DELETE FROM playlistitems WHERE playlistid = %d;",
"DELETE FROM files WHERE path LIKE 'spotify:%%' AND NOT path IN (SELECT filepath FROM playlistitems WHERE id <> %d);", "DELETE FROM files WHERE path LIKE 'spotify:%%' AND NOT path IN (SELECT filepath FROM playlistitems);",
}; };
char *query; char *query;
int i; int i;