PlaylistManager: Only search for folders, don't try it with webstreams.

This commit is contained in:
Fabian Schlenz 2019-11-28 06:29:51 +01:00
parent 519ac0e3bd
commit 8f19b990ff
1 changed files with 11 additions and 9 deletions

View File

@ -39,16 +39,18 @@ void PlaylistManager::scan_files() {
String folder = data.substring(eq + 1);
TRACE(" Adding mapping: %s=>%s\n", rfid_id.c_str(), folder.c_str());
_map[rfid_id] = folder;
bool found=false;
for (String f: folders) {
if (f.equals(folder)) {
found = true;
break;
if (folder.charAt(0)=='/') {
bool found=false;
for (String f: folders) {
if (f.equals(folder)) {
found = true;
break;
}
}
if (!found) {
INFO("WARNING: Found mapping for RFID id %s which maps to non-existing folder %s!\n", rfid_id.c_str(), folder.c_str());
}
}
if (!found) {
INFO("WARNING: Found mapping for RFID id %s which maps to non-existing folder %s!\n", rfid_id.c_str(), folder.c_str());
}
}
}