Update qt launcher to launch client if content cache dl fails

This commit is contained in:
Ryan Huffman 2019-09-25 08:49:20 -07:00
parent e6128003ec
commit c01b23b78d
2 changed files with 7 additions and 3 deletions

View file

@ -345,6 +345,8 @@ Q_INVOKABLE void LauncherState::receivedLoginReply() {
}
void LauncherState::requestSettings() {
// TODO Request settings if already logged in
QUrl lockerURL = METAVERSE_API_URL;
lockerURL.setPath("/api/v1/user/locker");
@ -561,6 +563,7 @@ void LauncherState::downloadContentCache() {
_downloadProgress = 0;
qDebug() << "Downloading content cache from: " << _contentCacheURL;
QNetworkRequest request{ QUrl(_contentCacheURL) };
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
auto reply = _networkAccessManager.get(request);
@ -589,8 +592,9 @@ void LauncherState::contentCacheDownloadComplete() {
auto reply = static_cast<QNetworkReply*>(sender());
if (reply->error()) {
qDebug() << "Error: " << reply->error() << reply->readAll();
setApplicationStateError("Failed to retrieve content cache");
qDebug() << "Error downloading content cache: " << reply->error() << reply->readAll();
qDebug() << "Continuing to launch client";
launchClient();
return;
}

View file

@ -157,7 +157,7 @@ private:
QString _applicationErrorMessage;
QString _currentClientVersion;
QString _buildTag { QString::null };
QString _contentCacheURL{ "https://orgs.highfidelity.com/content-cache/content_cache_small-only_data8.zip" }; // QString::null }; // If null, there is no content cache to download
QString _contentCacheURL;
QString _loginTokenResponse;
QString _homeLocation;
QFile _clientZipFile;