1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 11:47:46 +00:00

Refactor out the platform, boot, game update channels

This commit is contained in:
Joshua Goins 2024-11-09 14:30:10 -05:00
parent 726d48cbda
commit 253fd5f10f

View file

@ -18,6 +18,10 @@
#include "launchercore.h" #include "launchercore.h"
#include "utility.h" #include "utility.h"
const QString platform = QStringLiteral("win32");
const QString bootUpdateChannel = QStringLiteral("ffxivneo_release_boot");
const QString gameUpdateChannel = QStringLiteral("win32");
using namespace Qt::StringLiterals; using namespace Qt::StringLiterals;
SquareEnixLogin::SquareEnixLogin(LauncherCore &window, QObject *parent) SquareEnixLogin::SquareEnixLogin(LauncherCore &window, QObject *parent)
@ -158,7 +162,7 @@ QCoro::Task<bool> SquareEnixLogin::checkBootUpdates()
QUrl url; QUrl url;
url.setScheme(QStringLiteral("http")); url.setScheme(QStringLiteral("http"));
url.setHost(QStringLiteral("patch-bootver.%1").arg(m_launcher.settings()->squareEnixServer())); url.setHost(QStringLiteral("patch-bootver.%1").arg(m_launcher.settings()->squareEnixServer()));
url.setPath(QStringLiteral("/http/win32/ffxivneo_release_boot/%1/").arg(m_info->profile->bootVersion())); url.setPath(QStringLiteral("/http/%1/%2/%3/").arg(platform, gameUpdateChannel, m_info->profile->bootVersion()));
url.setQuery(query); url.setQuery(query);
auto request = QNetworkRequest(url); auto request = QNetworkRequest(url);
@ -346,7 +350,7 @@ QCoro::Task<bool> SquareEnixLogin::registerSession()
QUrl url; QUrl url;
url.setScheme(m_launcher.settings()->preferredProtocol()); url.setScheme(m_launcher.settings()->preferredProtocol());
url.setHost(QStringLiteral("patch-gamever.%1").arg(m_launcher.settings()->squareEnixServer())); url.setHost(QStringLiteral("patch-gamever.%1").arg(m_launcher.settings()->squareEnixServer()));
url.setPath(QStringLiteral("/http/win32/ffxivneo_release_game/%1/%2").arg(m_info->profile->baseGameVersion(), m_SID)); url.setPath(QStringLiteral("/http/%1/%2/%3/%4").arg(platform, gameUpdateChannel, m_info->profile->baseGameVersion(), m_SID));
auto request = QNetworkRequest(url); auto request = QNetworkRequest(url);
Utility::setSSL(request); Utility::setSSL(request);