Updated Modrinth esport messages
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
4a84084d9d
commit
19cb6ad588
@ -157,12 +157,12 @@ void FlamePackExportTask::collectHashes()
|
|||||||
|
|
||||||
void FlamePackExportTask::makeApiRequest()
|
void FlamePackExportTask::makeApiRequest()
|
||||||
{
|
{
|
||||||
setStatus(tr("Find versions for hashes..."));
|
|
||||||
if (pendingHashes.isEmpty()) {
|
if (pendingHashes.isEmpty()) {
|
||||||
buildZip();
|
buildZip();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setStatus(tr("Find versions for hashes..."));
|
||||||
auto response = std::make_shared<QByteArray>();
|
auto response = std::make_shared<QByteArray>();
|
||||||
|
|
||||||
QList<uint> fingerprints;
|
QList<uint> fingerprints;
|
||||||
|
@ -64,7 +64,8 @@ bool ModrinthPackExportTask::abort()
|
|||||||
|
|
||||||
if (buildZipFuture.isRunning()) {
|
if (buildZipFuture.isRunning()) {
|
||||||
buildZipFuture.cancel();
|
buildZipFuture.cancel();
|
||||||
// NOTE: Here we don't do `emitAborted()` because it will be done when `buildZipFuture` actually cancels, which may not occur immediately.
|
// NOTE: Here we don't do `emitAborted()` because it will be done when `buildZipFuture` actually cancels, which may not occur
|
||||||
|
// immediately.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,6 +95,7 @@ void ModrinthPackExportTask::collectFiles()
|
|||||||
|
|
||||||
void ModrinthPackExportTask::collectHashes()
|
void ModrinthPackExportTask::collectHashes()
|
||||||
{
|
{
|
||||||
|
setStatus(tr("Find file hashes..."));
|
||||||
for (const QFileInfo& file : files) {
|
for (const QFileInfo& file : files) {
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
|
|
||||||
@ -157,6 +159,7 @@ void ModrinthPackExportTask::makeApiRequest()
|
|||||||
if (pendingHashes.isEmpty())
|
if (pendingHashes.isEmpty())
|
||||||
buildZip();
|
buildZip();
|
||||||
else {
|
else {
|
||||||
|
setStatus(tr("Find versions for hashes..."));
|
||||||
auto response = std::make_shared<QByteArray>();
|
auto response = std::make_shared<QByteArray>();
|
||||||
task = api.currentVersions(pendingHashes.values(), "sha512", response);
|
task = api.currentVersions(pendingHashes.values(), "sha512", response);
|
||||||
connect(task.get(), &NetJob::succeeded, [this, response]() { parseApiResponse(response); });
|
connect(task.get(), &NetJob::succeeded, [this, response]() { parseApiResponse(response); });
|
||||||
|
Loading…
Reference in New Issue
Block a user