NOISSUE Redo Curse import on top of modpacks.ch API

This commit is contained in:
Petr Mrázek
2022-05-17 00:22:23 +02:00
parent 40e67d2bc6
commit ceaea5db2f
17 changed files with 460 additions and 51 deletions

View File

@@ -30,7 +30,7 @@ class PackInstallTask : public InstanceTask
Q_OBJECT
public:
explicit PackInstallTask(Modpack pack, QString version, PackType type = PackType::ModpacksCH);
explicit PackInstallTask(Modpack pack, QString version, PackType type = PackType::FTB);
virtual ~PackInstallTask(){}
bool canAbort() const override { return true; }

View File

@@ -22,6 +22,7 @@
#include <QUrl>
#include <QJsonObject>
#include <QMetaType>
#include "MCHPackType.h"
namespace ModpacksCH
{
@@ -72,16 +73,17 @@ struct VersionInfo
struct Modpack
{
int id;
PackType packType = PackType::FTB;
int id = 0;
QString name;
QString synopsis;
QString description;
QString type;
bool featured;
int installs;
int plays;
int64_t updated;
int64_t refreshed;
bool featured = false;
int installs = 0;
int plays = 0;
int64_t updated = 0;
int64_t refreshed = 0;
QVector<Art> art;
QVector<Author> authors;
QVector<VersionInfo> versions;

View File

@@ -23,7 +23,7 @@ namespace ModpacksCH {
QString getRealmForPackType(PackType type)
{
switch (type) {
case PackType::ModpacksCH:
case PackType::FTB:
return "modpack";
case PackType::CurseForge:
return "curseforge";

View File

@@ -21,7 +21,7 @@
namespace ModpacksCH {
enum class PackType {
ModpacksCH,
FTB,
CurseForge,
};