From 5f2fe873514519225e53a7458c7e41e963fbe0a9 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 17 Jan 2016 15:29:31 +0100 Subject: [PATCH] [spotify] Move purge so Spotify files get cleared even on empty .spotify (closes #219) --- src/spotify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spotify.c b/src/spotify.c index 9e9cbc92..5e75b6b3 100644 --- a/src/spotify.c +++ b/src/spotify.c @@ -1383,8 +1383,6 @@ logged_in(sp_session *sess, sp_error error) DPRINTF(E_LOG, L_SPOTIFY, "Login to Spotify succeeded. Reloading playlists.\n"); - db_spotify_purge(); - pl = fptr_sp_session_starred_create(sess); fptr_sp_playlist_add_callbacks(pl, &pl_callbacks, NULL); @@ -2058,6 +2056,8 @@ spotify_login(char *path) char *password; int ret; + db_spotify_purge(); + if (!g_sess) { if (!g_libhandle)