aboutsummaryrefslogtreecommitdiffstats
path: root/src/DatabaseQueue.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-14 23:28:36 +0100
committerMax Kellermann <max@duempel.org>2014-01-17 23:51:14 +0100
commit61b01f82ef0582d194d8adfa137a09f71ce728c1 (patch)
treea0e0bc303a89bfcf6011dab17eba1d6b7adb2fa8 /src/DatabaseQueue.cxx
parent75b847132afb75d50b3c7041f298fb4372ccd1c2 (diff)
downloadmpd-61b01f82ef0582d194d8adfa137a09f71ce728c1.tar.gz
mpd-61b01f82ef0582d194d8adfa137a09f71ce728c1.tar.xz
mpd-61b01f82ef0582d194d8adfa137a09f71ce728c1.zip
Mapper: add function map_song_detach()
Make the DetachedSong(Song) conversion constructor private. Everybody should use map_song_detach() which will take over more responsibilities soon.
Diffstat (limited to 'src/DatabaseQueue.cxx')
-rw-r--r--src/DatabaseQueue.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/DatabaseQueue.cxx b/src/DatabaseQueue.cxx
index 697771273..0ed073285 100644
--- a/src/DatabaseQueue.cxx
+++ b/src/DatabaseQueue.cxx
@@ -24,6 +24,7 @@
#include "Partition.hxx"
#include "util/Error.hxx"
#include "DetachedSong.hxx"
+#include "Mapper.hxx"
#include <functional>
@@ -31,7 +32,8 @@ static bool
AddToQueue(Partition &partition, const Song &song, Error &error)
{
PlaylistResult result =
- partition.playlist.AppendSong(partition.pc, DetachedSong(song),
+ partition.playlist.AppendSong(partition.pc,
+ map_song_detach(song),
nullptr);
if (result != PlaylistResult::SUCCESS) {
error.Set(playlist_domain, int(result), "Playlist error");