fix(ManagedPackPage): give extra_info to InstanceImportTask in MR packs

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-11-12 12:49:03 -03:00
parent 38f59fdf39
commit 34794cc4af
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469

View File

@ -246,7 +246,11 @@ void ModrinthManagedPackPage::update()
auto index = ui->versionsComboBox->currentIndex();
auto version = m_pack.versions.at(index);
auto extracted = new InstanceImportTask(version.download_url, this);
QMap<QString, QString> extra_info;
extra_info.insert("pack_id", m_pack.id);
extra_info.insert("pack_version_id", version.id);
auto extracted = new InstanceImportTask(version.download_url, this, extra_info);
InstanceName inst_name(m_inst->getManagedPackName(), version.version);
inst_name.setName(m_inst->name().replace(m_inst->getManagedPackVersionName(), version.version));