aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistSong.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/PlaylistSong.cxx')
-rw-r--r--src/PlaylistSong.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/PlaylistSong.cxx b/src/PlaylistSong.cxx
index 72d2760c6..6bdb164fd 100644
--- a/src/PlaylistSong.cxx
+++ b/src/PlaylistSong.cxx
@@ -20,9 +20,10 @@
#include "config.h"
#include "PlaylistSong.hxx"
#include "Mapper.hxx"
+#include "DatabasePlugin.hxx"
+#include "DatabaseGlue.hxx"
extern "C" {
-#include "database.h"
#include "song.h"
#include "uri.h"
#include "path.h"
@@ -105,13 +106,17 @@ playlist_check_load_song(const struct song *song, const char *uri, bool secure)
if (dest == NULL)
return NULL;
} else {
- struct song *tmp = db_get_song(uri);
+ const Database *db = GetDatabase(nullptr);
+ if (db == nullptr)
+ return nullptr;
+
+ struct song *tmp = db->GetSong(uri, nullptr);
if (tmp == NULL)
/* not found in database */
return NULL;
dest = song_dup_detached(tmp);
- db_return_song(tmp);
+ db->ReturnSong(tmp);
}
return apply_song_metadata(dest, song);