From c13810ebaa7075284691eb2add089ba407dfd1ea Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Feb 2014 00:29:07 +0100 Subject: Mapper: move map_song_detach() to db/DatabaseSong.cxx Use Storage::MapUTF8() internally, don't use global variables. --- src/db/DatabaseQueue.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/db/DatabaseQueue.cxx') 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 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"); -- cgit v1.2.3