diff options
author | Max Kellermann <max@duempel.org> | 2014-02-07 00:29:07 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-07 00:42:14 +0100 |
commit | c13810ebaa7075284691eb2add089ba407dfd1ea (patch) | |
tree | 1ebeb2104ee4a3e73f49416267aec2e79943821b /src/db/DatabaseQueue.cxx | |
parent | 19a982cf693e660ce296a29a9830f1e94d9f1b4c (diff) | |
download | mpd-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 'src/db/DatabaseQueue.cxx')
-rw-r--r-- | src/db/DatabaseQueue.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/db/DatabaseQueue.cxx b/src/db/DatabaseQueue.cxx index f2a0951a6..77fd57fe3 100644 --- a/src/db/DatabaseQueue.cxx +++ b/src/db/DatabaseQueue.cxx @@ -19,22 +19,23 @@ #include "config.h" #include "DatabaseQueue.hxx" -#include "DatabaseGlue.hxx" +#include "DatabaseSong.hxx" #include "DatabasePlugin.hxx" #include "Partition.hxx" #include "Instance.hxx" #include "util/Error.hxx" #include "DetachedSong.hxx" -#include "Mapper.hxx" #include <functional> static bool AddToQueue(Partition &partition, const LightSong &song, Error &error) { + const Storage &storage = *partition.instance.storage; PlaylistResult result = partition.playlist.AppendSong(partition.pc, - map_song_detach(song), + DatabaseDetachSong(storage, + song), nullptr); if (result != PlaylistResult::SUCCESS) { error.Set(playlist_domain, int(result), "Playlist error"); |