fix(ManagedPackPage): preserve pack ID from Modrinth update

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-11-25 10:19:03 -03:00
parent 1630a23fb0
commit 80054e4db2
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469

View File

@ -272,7 +272,8 @@ void ModrinthManagedPackPage::update()
auto version = m_pack.versions.at(index); auto version = m_pack.versions.at(index);
QMap<QString, QString> extra_info; QMap<QString, QString> extra_info;
extra_info.insert("pack_id", m_pack.id); // NOTE: Don't use 'm_pack.id' here, since we didn't completely parse all the metadata for the pack, including this field.
extra_info.insert("pack_id", m_inst->getManagedPackID());
extra_info.insert("pack_version_id", version.id); extra_info.insert("pack_version_id", version.id);
auto extracted = new InstanceImportTask(version.download_url, this, std::move(extra_info)); auto extracted = new InstanceImportTask(version.download_url, this, std::move(extra_info));