From 3b8532f3fb379c7ecc6b64eecbbf9c824d18e875 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 15 Aug 2012 23:28:19 +0200 Subject: DatabasePlugin: add method ReturnSong() Allow the plugin to allocate the GetSong() return value. --- src/playlist_queue.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/playlist_queue.c') diff --git a/src/playlist_queue.c b/src/playlist_queue.c index aada94984..8eb535dbd 100644 --- a/src/playlist_queue.c +++ b/src/playlist_queue.c @@ -41,8 +41,7 @@ playlist_load_into_queue(const char *uri, struct playlist_provider *source, ++i) { if (i < start_index) { /* skip songs before the start index */ - if (!song_in_database(song)) - song_free(song); + song_free(song); continue; } @@ -51,9 +50,8 @@ playlist_load_into_queue(const char *uri, struct playlist_provider *source, continue; result = playlist_append_song(dest, pc, song, NULL); + song_free(song); if (result != PLAYLIST_RESULT_SUCCESS) { - if (!song_in_database(song)) - song_free(song); g_free(base_uri); return result; } -- cgit v1.2.3