update: delete stickers of deleted songs
When a song is deleted from the database, remove its sticker, too. What's still missing is some sort of garbage collector after a fresh database create (--create-db).
This commit is contained in:
parent
638f95aa15
commit
2934585d5a
@ -36,6 +36,10 @@
|
||||
#include "main.h"
|
||||
#include "config.h"
|
||||
|
||||
#ifdef ENABLE_SQLITE
|
||||
#include "song_sticker.h"
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <assert.h>
|
||||
@ -717,6 +721,11 @@ static void song_delete_event(void)
|
||||
g_debug("removing: %s", uri);
|
||||
g_free(uri);
|
||||
|
||||
#ifdef ENABLE_SQLITE
|
||||
/* if the song has a sticker, delete it */
|
||||
sticker_song_delete(delete);
|
||||
#endif
|
||||
|
||||
deleteASongFromPlaylist(delete);
|
||||
delete = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user