db/upnp: call VisitDirectory on servers, even in recursive mode
This commit is contained in:
parent
77c461fed7
commit
f703d4fc3e
@ -677,24 +677,20 @@ UpnpDatabase::Visit(const DatabaseSelection &selection,
|
|||||||
if (!m_superdir->getDirServices(servers, error))
|
if (!m_superdir->getDirServices(servers, error))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!selection.recursive) {
|
for (const auto &server : servers) {
|
||||||
// If the path is empty and recursive is not set, synthetize a
|
|
||||||
// pseudo-directory from the list of servers.
|
|
||||||
if (visit_directory) {
|
if (visit_directory) {
|
||||||
for (auto& server : servers) {
|
const LightDirectory d(server.getFriendlyName(), 0);
|
||||||
const LightDirectory d(server.getFriendlyName(), 0);
|
if (!visit_directory(d, error))
|
||||||
if (!visit_directory(d, error))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Recursive is set: visit each server
|
|
||||||
for (auto& server : servers) {
|
|
||||||
if (!VisitServer(server, vpath, selection,
|
|
||||||
visit_directory, visit_song, visit_playlist, error))
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (selection.recursive &&
|
||||||
|
!VisitServer(server, vpath, selection,
|
||||||
|
visit_directory, visit_song, visit_playlist,
|
||||||
|
error))
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user