added side for modrinth mods

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2023-09-10 16:22:57 +03:00
parent a2d44744fe
commit 47d1f23568
8 changed files with 73 additions and 12 deletions

View File

@ -35,12 +35,12 @@ auto getRealIndexName(QDir& index_dir, QString normalized_index_name, bool shoul
class V1 {
public:
enum class Side { ClientSide = 1 << 0, ServerSide = 1 << 1, UniversalSide = ClientSide | ServerSide };
struct Mod {
QString slug{};
QString name{};
QString filename{};
// FIXME: make side an enum
QString side{ "both" };
Side side{ Side::UniversalSide };
// [download]
QString mode{};
@ -93,6 +93,9 @@ class V1 {
* If the mod doesn't have a metadata, it simply returns an empty Mod object.
* */
static auto getIndexForMod(QDir& index_dir, QVariant& mod_id) -> Mod;
static auto sideToString(Side side) -> QString;
static auto stringToSide(QString side) -> Side;
};
} // namespace Packwiz