DatabasePlugin: add method ReturnSong()

Allow the plugin to allocate the GetSong() return value.
This commit is contained in:
Max Kellermann
2012-08-15 23:28:19 +02:00
parent f45616e5f6
commit 3b8532f3fb
13 changed files with 85 additions and 14 deletions

View File

@@ -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;
}