mpd: make GetRecursiveDirectory return SongIterator
This commit is contained in:
@@ -447,17 +447,20 @@ void SearchEngine::Search()
|
||||
MPD::SongList list;
|
||||
if (Config.search_in_db)
|
||||
{
|
||||
MPD::ItemIterator item = Mpd.GetDirectoryRecursive("/"), end;
|
||||
for (; item != end; ++item)
|
||||
if (item->type() != MPD::Item::Type::Song)
|
||||
list.push_back(std::move(item->song()));
|
||||
std::copy(
|
||||
std::make_move_iterator(Mpd.GetDirectoryRecursive("/")),
|
||||
std::make_move_iterator(MPD::SongIterator()),
|
||||
std::back_inserter(list)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::copy(
|
||||
myPlaylist->main().beginV(),
|
||||
myPlaylist->main().endV(),
|
||||
std::back_inserter(list)
|
||||
);
|
||||
}
|
||||
|
||||
bool any_found = 1;
|
||||
bool found = 1;
|
||||
|
||||
Reference in New Issue
Block a user