fix delete query for removing files if a spotify playlist is deleted
This commit is contained in:
parent
647eae17ee
commit
3208315503
2
src/db.c
2
src/db.c
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue