If "list genre" returns empty, then also check "list artist". If both
are empty, then we can assume backend is upnp
This commit is contained in:
committed by
Craig Drummond
parent
f16ecf48f8
commit
2181773dea
@@ -1910,9 +1910,13 @@ bool MPDConnection::recursivelyListDir(const QString &dir)
|
||||
// UPnP servers returing directories of classifications - Genre/Album/Tracks, Artist/Album/Tracks,
|
||||
// etc...
|
||||
if (topLevel) {
|
||||
Response response=sendCommand("list genre");
|
||||
Response response=sendCommand("list genre", false, false);
|
||||
if (!response.ok || response.data.split('\n').length()<3) { // 2 lines - OK and blank
|
||||
return false;
|
||||
// ..just to be 100% sure, check no artists either...
|
||||
response=sendCommand("list artist", false, false);
|
||||
if (!response.ok || response.data.split('\n').length()<3) { // 2 lines - OK and blank
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user