a/src/ohcredentials.cxx b/src/ohcredentials.cxx
...
...
65
65
66
// Called from OHPlaylist. The CP (Kazoo/Lumin mostly) will send URIs
66
// Called from OHPlaylist. The CP (Kazoo/Lumin mostly) will send URIs
67
// like qobuz:// tidal:// and expect the renderer to know what to do
67
// like qobuz:// tidal:// and expect the renderer to know what to do
68
// with them. We transform them so that they point to our media server
68
// with them. We transform them so that they point to our media server
69
// gateway (which should be running of course for this to work).
69
// gateway (which should be running of course for this to work).
70
bool OHCredsMaybeMorphSpecialUri(string& uri)
70
bool OHCredsMaybeMorphSpecialUri(string& uri, bool& isStreaming)
71
{
71
{
72
    isStreaming = false;
72
    if (uri.find("http://") == 0 || uri.find("https://") == 0) {
73
    if (uri.find("http://") == 0 || uri.find("https://") == 0) {
73
        return true;
74
        return true;
74
    }
75
    }
75
76
77
    // Possibly retrieve the IP port used by our proxy server
76
    static string sport;
78
    static string sport;
77
    if (sport.empty()) {
79
    if (sport.empty()) {
78
        std::unique_lock<std::mutex>(g_configlock);
79
        int port = CDPluginServices::default_microhttpport();
80
        int port = CDPluginServices::default_microhttpport();
80
        if (!g_config->get("plgmicrohttpport", sport)) {
81
        if (!g_config->get("plgmicrohttpport", sport)) {
81
            sport = SoapHelp::i2s(port);
82
            sport = SoapHelp::i2s(port);
82
        }
83
        }
83
    }
84
    }
...
...
99
        // trackId parameter. Make it look what the plugins normally
100
        // trackId parameter. Make it look what the plugins normally
100
        // generate anyway:
101
        // generate anyway:
101
        string path = path_cat(pathprefix,
102
        string path = path_cat(pathprefix,
102
                               "track?version=1&trackId=" + mr[3].str());
103
                               "track?version=1&trackId=" + mr[3].str());
103
        uri = string("http://") + upnphost + ":" + sport + path;
104
        uri = string("http://") + upnphost + ":" + sport + path;
105
        isStreaming = true;
104
    }
106
    }
105
    return found;
107
    return found;
106
}
108
}
107
109
108
// We might want to derive this into ServiceCredsQobuz,
110
// We might want to derive this into ServiceCredsQobuz,