aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistPrint.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/PlaylistPrint.cxx')
-rw-r--r--src/PlaylistPrint.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/PlaylistPrint.cxx b/src/PlaylistPrint.cxx
index e3d500be3..c984ea224 100644
--- a/src/PlaylistPrint.cxx
+++ b/src/PlaylistPrint.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -23,8 +23,6 @@
#include "PlaylistAny.hxx"
#include "PlaylistSong.hxx"
#include "Playlist.hxx"
-#include "PlaylistRegistry.hxx"
-#include "PlaylistPlugin.hxx"
#include "QueuePrint.hxx"
#include "SongEnumerator.hxx"
#include "SongPrint.hxx"
@@ -32,11 +30,14 @@
#include "DatabasePlugin.hxx"
#include "Client.hxx"
#include "InputStream.hxx"
-#include "Song.hxx"
+#include "DetachedSong.hxx"
#include "fs/Traits.hxx"
#include "util/Error.hxx"
#include "thread/Cond.hxx"
+#define SONG_FILE "file: "
+#define SONG_TIME "Time: "
+
void
playlist_print_uris(Client &client, const playlist &playlist)
{
@@ -119,7 +120,7 @@ PrintSongDetails(Client &client, const char *uri_utf8)
if (db == nullptr)
return false;
- Song *song = db->GetSong(uri_utf8, IgnoreError());
+ auto *song = db->GetSong(uri_utf8, IgnoreError());
if (song == nullptr)
return false;
@@ -150,10 +151,10 @@ playlist_provider_print(Client &client, const char *uri,
SongEnumerator &e, bool detail)
{
const std::string base_uri = uri != nullptr
- ? PathTraits::GetParentUTF8(uri)
+ ? PathTraitsUTF8::GetParent(uri)
: std::string(".");
- Song *song;
+ DetachedSong *song;
while ((song = e.NextSong()) != nullptr) {
song = playlist_check_translate_song(song, base_uri.c_str(),
false);
@@ -165,7 +166,7 @@ playlist_provider_print(Client &client, const char *uri,
else
song_print_uri(client, *song);
- song->Free();
+ delete song;
}
}