mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-26 17:25:13 +01:00
Handle errors from icecast directory requests.
When a request fails, show an error dialog and don't attempt to parse results.
This commit is contained in:
parent
2132310873
commit
efb4f8a15a
@ -125,6 +125,14 @@ void IcecastService::DownloadDirectoryFinished(QNetworkReply* reply,
|
||||
return;
|
||||
}
|
||||
|
||||
if (reply->error() != QNetworkReply::NoError) {
|
||||
app_->task_manager()->SetTaskFinished(task_id);
|
||||
app_->AddError(tr("Failed to update icecast directory:\n%1")
|
||||
.arg(reply->errorString()));
|
||||
reply->deleteLater();
|
||||
return;
|
||||
}
|
||||
|
||||
QFuture<IcecastBackend::StationList> future =
|
||||
QtConcurrent::run(this, &IcecastService::ParseDirectory, reply);
|
||||
NewClosure(future, this, SLOT(ParseDirectoryFinished(
|
||||
|
Loading…
Reference in New Issue
Block a user