From deada4f635b662fc3ff77cae2c1d585e0ab9e1ac Mon Sep 17 00:00:00 2001 From: Henk Kalkwater Date: Mon, 25 Oct 2021 16:11:10 +0200 Subject: [PATCH] core: Use the public constructor of ClientCapabilitiesDTO In the ApiClient, the constructor without arguments was used to create a ClientCapabilitiesDTO. Since this constructor has been made private, ApiClient now uses the other public constructor to allow the code to compile once again. --- core/src/apiclient.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/apiclient.cpp b/core/src/apiclient.cpp index ff54107..9c26aad 100644 --- a/core/src/apiclient.cpp +++ b/core/src/apiclient.cpp @@ -254,6 +254,7 @@ QNetworkReply *ApiClient::post(const QString &path, const QByteArray &data, cons req.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); addBaseRequestHeaders(req, path, params); qDebug() << "POST " << req.url(); + qDebug() << " DATA: " << data; if (data.isEmpty()) return m_naManager.post(req, QByteArray()); else { @@ -430,16 +431,15 @@ void ApiClient::generateDeviceProfile() { deviceProfile->setMaxStreamingBitrate(d->settings->maxStreamingBitRate()); d->deviceProfile = deviceProfile; - QSharedPointer clientCapabilities = QSharedPointer::create(); + QSharedPointer clientCapabilities = QSharedPointer::create(true, // supports mediaControl + false, // supports content uploading + true, // supports persistent identifier + false, // supports sync + deviceProfile); clientCapabilities->setPlayableMediaTypes({"Audio", "Video", "Photo"}); - clientCapabilities->setDeviceProfile(deviceProfile); clientCapabilities->setSupportedCommands(d->supportedCommands); clientCapabilities->setAppStoreUrl("https://chris.netsoj.nl/projects/harbour-sailfin"); clientCapabilities->setIconUrl("https://chris.netsoj.nl/static/img/logo.png"); - clientCapabilities->setSupportsPersistentIdentifier(true); - clientCapabilities->setSupportsSync(false); - clientCapabilities->setSupportsMediaControl(true); - clientCapabilities->setSupportsContentUploading(false); d->clientCapabilities = clientCapabilities; emit deviceProfileChanged();