feat: add metadata get/delete via mod id
This is, in many cases, more reliable than name comparisons, so it's useful specially in cases where a mod changes name between versions Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
@ -52,8 +52,18 @@ class Metadata {
|
||||
Packwiz::V1::deleteModIndex(index_dir, mod_name);
|
||||
}
|
||||
|
||||
static void remove(QDir& index_dir, QVariant& mod_id)
|
||||
{
|
||||
Packwiz::V1::deleteModIndex(index_dir, mod_id);
|
||||
}
|
||||
|
||||
static auto get(QDir& index_dir, QString& mod_name) -> ModStruct
|
||||
{
|
||||
return Packwiz::V1::getIndexForMod(index_dir, mod_name);
|
||||
}
|
||||
|
||||
static auto get(QDir& index_dir, QVariant& mod_id) -> ModStruct
|
||||
{
|
||||
return Packwiz::V1::getIndexForMod(index_dir, mod_id);
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user