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.
This commit is contained in:
Bart De Vries 2023-01-19 20:43:27 +01:00
parent 1b32b64b67
commit acd1a55aae
1 changed files with 1 additions and 1 deletions

View File

@ -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,