Rework curseforge download (#611)

* Use the bulk endpoint on mod resolution for faster download
* Search on modrinth for api blocked mods
* Display a dialog for manually downloading blocked mods
This commit is contained in:
timoreo22
2022-05-28 21:53:12 +02:00
committed by GitHub
parent fcbe233fdb
commit 699ad316f0
14 changed files with 633 additions and 103 deletions

View File

@ -2,19 +2,24 @@
#include <QString>
#include <QVector>
#include <QMap>
#include <QUrl>
#include <QJsonObject>
namespace Flame
{
struct File
{
// NOTE: throws JSONValidationError
bool parseFromBytes(const QByteArray &bytes);
bool parseFromObject(const QJsonObject& object);
int projectId = 0;
int fileId = 0;
// NOTE: the opposite to 'optional'. This is at the time of writing unused.
bool required = true;
QString hash;
// NOTE: only set on blocked files ! Empty otherwise.
QString websiteUrl;
// our
bool resolved = false;
@ -54,7 +59,8 @@ struct Manifest
QString name;
QString version;
QString author;
QVector<Flame::File> files;
//File id -> File
QMap<int,Flame::File> files;
QString overrides;
};