Switch to unified view

a/src/mediaserver/contentdirectory.cxx b/src/mediaserver/contentdirectory.cxx
...
...
170
170
171
    for (const auto& entry : entries) {
171
    for (const auto& entry : entries) {
172
        if (!entry.compare("pycommon")) {
172
        if (!entry.compare("pycommon")) {
173
            continue;
173
            continue;
174
        }
174
        }
175
        string userparam = entry + "user";
175
        string userkey = entry + "user";
176
        string autostartkey = entry + "autostart";
176
        if (!g_config->hasNameAnywhere(userparam)) {
177
        if (!g_config->hasNameAnywhere(userkey) &&
178
            !g_config->hasNameAnywhere(autostartkey)) {
177
            LOGDEB("ContentDirectory: not creating entry for " << entry <<
179
            LOGINF("ContentDirectory: not creating entry for " << entry <<
178
                   " because " << userparam <<
180
                   " because neither " << userkey << " nor " << autostartkey <<
179
                   " is not defined in configuration\n");
181
                   " are defined in the configuration\n");
180
            continue;
182
            continue;
181
        }
183
        }
182
184
183
        // If the title parameter is not defined in the configuration,
185
        // If the title parameter is not defined in the configuration,
184
        // we compute a title (to be displayed in the root directory)
186
        // we compute a title (to be displayed in the root directory)
...
...
467
    data.addarg("TotalMatches", out_TotalMatches);
469
    data.addarg("TotalMatches", out_TotalMatches);
468
    data.addarg("UpdateID", out_UpdateID);
470
    data.addarg("UpdateID", out_UpdateID);
469
    return UPNP_E_SUCCESS;
471
    return UPNP_E_SUCCESS;
470
}
472
}
471
473
472
std::string ContentDirectory::getpathprefix(CDPlugin *plg)
473
{
474
    return string("/") + plg->getname();
475
}
476
477
static string firstpathelt(const string& path)
474
static string firstpathelt(const string& path)
478
{
475
{
479
    // The parameter is normally a path, but make this work with an URL too
476
    // The parameter is normally a path, but make this work with an URL too
480
    string::size_type pos = path.find("://");
477
    string::size_type pos = path.find("://");
481
    if (pos != string::npos) {
478
    if (pos != string::npos) {