Merge 88399cf922062657819d5e11c838ae2947b13e3e into 6aa728b12a8f6750ac2115635fd070621137d675

This commit is contained in:
Alexandru Ionut Tripon 2025-09-22 11:49:06 +00:00 committed by GitHub
commit 877f6bf505
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -52,7 +52,7 @@ void Modrinth::loadIndexedPack(ModPlatform::IndexedPack& pack, QJsonObject& obj)
pack.description = Json::ensureString(obj, "description", "");
pack.logoUrl = Json::ensureString(obj, "icon_url", "");
pack.logoName = pack.addonId.toString();
pack.logoName = QString("%1.%2").arg(Json::ensureString(obj, "slug"), QFileInfo(QUrl(pack.logoUrl).fileName()).suffix());
ModPlatform::ModpackAuthor modAuthor;
modAuthor.name = Json::ensureString(obj, "author", QObject::tr("No author(s)"));

View File

@ -320,9 +320,9 @@ void ModrinthPage::suggestCurrent()
extra_info.insert("pack_version_id", ver.fileId.toString());
m_dialog->setSuggestedPack(m_current->name, ver.version, new InstanceImportTask(ver.downloadUrl, this, std::move(extra_info)));
auto iconName = m_current->logoName;
m_model->getLogo(iconName, m_current->logoUrl,
[this, iconName](QString logo) { m_dialog->setSuggestedIconFromFile(logo, iconName); });
QString editedLogoName = "modrinth_" + m_current->logoName;
m_model->getLogo(m_current->logoName, m_current->logoUrl,
[this, editedLogoName](QString logo) { m_dialog->setSuggestedIconFromFile(logo, editedLogoName); });
break;
}