aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-19 23:16:08 +0100
committerMax Kellermann <max@duempel.org>2014-01-19 23:16:08 +0100
commita506adea41e21e071ac3e88d69824d6dd3a3c925 (patch)
tree732c751a5aed1c3e5542dfcf8cef6a9b484ba332 /src
parentf5ae1ce00b85699291a7cdf9782574e70a8c28f5 (diff)
downloadmpd-a506adea41e21e071ac3e88d69824d6dd3a3c925.tar.gz
mpd-a506adea41e21e071ac3e88d69824d6dd3a3c925.tar.xz
mpd-a506adea41e21e071ac3e88d69824d6dd3a3c925.zip
Directory: use Song::Export()
Diffstat (limited to 'src')
-rw-r--r--src/Directory.cxx16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/Directory.cxx b/src/Directory.cxx
index 210d7cb67..b230ac642 100644
--- a/src/Directory.cxx
+++ b/src/Directory.cxx
@@ -252,20 +252,6 @@ Directory::Sort()
child->Sort();
}
-static LightSong
-ExportSong(const Song &src)
-{
- LightSong dest;
- dest.directory = src.parent->IsRoot()
- ? nullptr : src.parent->GetPath();
- dest.uri = src.uri;
- dest.tag = &src.tag;
- dest.mtime = src.mtime;
- dest.start_ms = src.start_ms;
- dest.end_ms = src.end_ms;
- return dest;
-}
-
bool
Directory::Walk(bool recursive, const SongFilter *filter,
VisitDirectory visit_directory, VisitSong visit_song,
@@ -277,7 +263,7 @@ Directory::Walk(bool recursive, const SongFilter *filter,
if (visit_song) {
Song *song;
directory_for_each_song(song, *this) {
- const LightSong song2 = ExportSong(*song);
+ const LightSong song2 = song->Export();
if ((filter == nullptr || filter->Match(song2)) &&
!visit_song(song2, error))
return false;