aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/db/UpnpDatabasePlugin.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/db/UpnpDatabasePlugin.cxx b/src/db/UpnpDatabasePlugin.cxx
index b746e28cb..69a9003d7 100644
--- a/src/db/UpnpDatabasePlugin.cxx
+++ b/src/db/UpnpDatabasePlugin.cxx
@@ -350,14 +350,21 @@ UpnpDatabase::SearchSongs(ContentDirectoryService &server,
}
static bool
-visitSong(UPnPDirObject &&meta, std::string &&path,
+visitSong(const UPnPDirObject &meta, std::string &&path,
const DatabaseSelection &selection,
VisitSong visit_song, Error& error)
{
if (!visit_song)
return true;
- const UpnpSong song(std::move(meta), std::move(path));
+ LightSong song;
+ song.directory = nullptr;
+ song.uri = path.c_str();
+ song.real_uri = meta.url.c_str();
+ song.tag = &meta.tag;
+ song.mtime = 0;
+ song.start_ms = song.end_ms = 0;
+
return !selection.Match(song) || visit_song(song, error);
}