Switch to unified view

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);
80
        std::unique_lock<std::mutex>(g_configlock);
79
        int port = CDPluginServices::default_microhttpport();
81
        int port = CDPluginServices::default_microhttpport();
80
        if (!g_config->get("plgmicrohttpport", sport)) {
82
        if (!g_config->get("plgmicrohttpport", sport)) {
...
...
99
        // trackId parameter. Make it look what the plugins normally
101
        // trackId parameter. Make it look what the plugins normally
100
        // generate anyway:
102
        // generate anyway:
101
        string path = path_cat(pathprefix,
103
        string path = path_cat(pathprefix,
102
                               "track?version=1&trackId=" + mr[3].str());
104
                               "track?version=1&trackId=" + mr[3].str());
103
        uri = string("http://") + upnphost + ":" + sport + path;
105
        uri = string("http://") + upnphost + ":" + sport + path;
106
        isStreaming = true;
104
    }
107
    }
105
    return found;
108
    return found;
106
}
109
}
107
110
108
// We might want to derive this into ServiceCredsQobuz,
111
// We might want to derive this into ServiceCredsQobuz,