mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-23 21:07:45 +00:00
Fix patch list parsing, add more debug messages for patcher
This commit is contained in:
parent
0fa7896e55
commit
d37d43847c
1 changed files with 7 additions and 1 deletions
|
@ -34,7 +34,7 @@ void Patcher::processPatchList(QNetworkAccessManager& mgr, const QString& patchL
|
||||||
dialog->setLabelText("Updating the FINAL FANTASY XIV Game version.");
|
dialog->setLabelText("Updating the FINAL FANTASY XIV Game version.");
|
||||||
}
|
}
|
||||||
|
|
||||||
const QStringList parts = patchList.split("\n|\r\n|\r");
|
const QStringList parts = patchList.split("\r\n");
|
||||||
|
|
||||||
remainingPatches = parts.size() - 7;
|
remainingPatches = parts.size() - 7;
|
||||||
|
|
||||||
|
@ -55,6 +55,8 @@ void Patcher::processPatchList(QNetworkAccessManager& mgr, const QString& patchL
|
||||||
name = url.split('/').last().remove(".patch");
|
name = url.split('/').last().remove(".patch");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qDebug() << "Parsed patch name: " << name;
|
||||||
|
|
||||||
auto url_parts = url.split('/');
|
auto url_parts = url.split('/');
|
||||||
repository = url_parts[url_parts.size() - 3];
|
repository = url_parts[url_parts.size() - 3];
|
||||||
|
|
||||||
|
@ -76,6 +78,8 @@ void Patcher::processPatchList(QNetworkAccessManager& mgr, const QString& patchL
|
||||||
QDir().mkpath(patchesDir);
|
QDir().mkpath(patchesDir);
|
||||||
|
|
||||||
if (!QFile::exists(patchesDir + "/" + name + ".patch")) {
|
if (!QFile::exists(patchesDir + "/" + name + ".patch")) {
|
||||||
|
qDebug() << "Need to download " + name;
|
||||||
|
|
||||||
QNetworkRequest patchRequest(url);
|
QNetworkRequest patchRequest(url);
|
||||||
auto patchReply = mgr.get(patchRequest);
|
auto patchReply = mgr.get(patchRequest);
|
||||||
connect(patchReply, &QNetworkReply::downloadProgress, [=](int recieved, int total) {
|
connect(patchReply, &QNetworkReply::downloadProgress, [=](int recieved, int total) {
|
||||||
|
@ -96,6 +100,8 @@ void Patcher::processPatchList(QNetworkAccessManager& mgr, const QString& patchL
|
||||||
checkIfDone();
|
checkIfDone();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
qDebug() << "Found existing patch: " << name;
|
||||||
|
|
||||||
patchQueue.push_back({name, repository, version, patchesDir + "/" + name + ".patch"});
|
patchQueue.push_back({name, repository, version, patchesDir + "/" + name + ".patch"});
|
||||||
|
|
||||||
remainingPatches--;
|
remainingPatches--;
|
||||||
|
|
Loading…
Add table
Reference in a new issue