From acd1a55aaea2b0dd235821ddee18f432c0a2a2bc Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Thu, 19 Jan 2023 20:43:27 +0100 Subject: [PATCH] Fix minor issue with network connect check in AudioManager AudioManager was reporting no connectivity in case the networkstatus was reported as being "Unknown". We might as well attempt to stream in that case. If there is no connectivity, it will fail anyway with another useful error message. --- src/audiomanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audiomanager.cpp b/src/audiomanager.cpp index c4fe6033..2fc1d2c0 100644 --- a/src/audiomanager.cpp +++ b/src/audiomanager.cpp @@ -363,7 +363,7 @@ void AudioManager::play() // if we're streaming, check that we're still connected and check for metered // connection if (isStreaming()) { - if (d->m_networkStatus.connectivity() != SolidExtras::NetworkStatus::Yes + if (d->m_networkStatus.connectivity() == SolidExtras::NetworkStatus::No || (d->m_networkStatus.metered() != SolidExtras::NetworkStatus::No && !SettingsManager::self()->allowMeteredStreaming())) { qCDebug(kastsAudio) << "Refusing to play: no connection or streaming on metered connection not allowed"; Q_EMIT logError(Error::Type::MeteredStreamingNotAllowed,