aboutsummaryrefslogtreecommitdiffstats
path: root/src/SongLoader.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-07 00:29:07 +0100
committerMax Kellermann <max@duempel.org>2014-02-07 00:42:14 +0100
commitc13810ebaa7075284691eb2add089ba407dfd1ea (patch)
tree1ebeb2104ee4a3e73f49416267aec2e79943821b /src/SongLoader.cxx
parent19a982cf693e660ce296a29a9830f1e94d9f1b4c (diff)
downloadmpd-c13810ebaa7075284691eb2add089ba407dfd1ea.tar.gz
mpd-c13810ebaa7075284691eb2add089ba407dfd1ea.tar.xz
mpd-c13810ebaa7075284691eb2add089ba407dfd1ea.zip
Mapper: move map_song_detach() to db/DatabaseSong.cxx
Use Storage::MapUTF8() internally, don't use global variables.
Diffstat (limited to '')
-rw-r--r--src/SongLoader.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/SongLoader.cxx b/src/SongLoader.cxx
index 08aa01296..f2cf216a7 100644
--- a/src/SongLoader.cxx
+++ b/src/SongLoader.cxx
@@ -36,7 +36,8 @@
#ifdef ENABLE_DATABASE
SongLoader::SongLoader(const Client &_client)
- :client(&_client), db(_client.GetDatabase(IgnoreError())) {}
+ :client(&_client), db(_client.GetDatabase(IgnoreError())),
+ storage(_client.GetStorage()) {}
#endif
@@ -100,7 +101,8 @@ SongLoader::LoadSong(const char *uri_utf8, Error &error) const
#ifdef ENABLE_DATABASE
if (db != nullptr)
- return DatabaseDetachSong(*db, uri_utf8, error);
+ return DatabaseDetachSong(*db, *storage,
+ uri_utf8, error);
#endif
error.Set(playlist_domain, int(PlaylistResult::NO_SUCH_SONG),