mirror of https://github.com/KDE/kasts.git
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:
parent
1b32b64b67
commit
acd1a55aae
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue