change: mod metadata improvements

- Use slug instead of name
- Keep temporary status before having local details

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-06-19 14:26:15 -03:00
parent a53ee2e35c
commit fd6755c93f
10 changed files with 96 additions and 67 deletions

View File

@ -47,10 +47,9 @@ void ModDownloadTask::downloadSucceeded()
{
m_filesNetJob.reset();
auto name = std::get<0>(to_delete);
if (!name.isEmpty()) {
// If they have the same name, we keep the metadata.
// This is a workaround for mods that change names between versions ;c
mods->uninstallMod(std::get<1>(to_delete), name == m_mod.name);
auto filename = std::get<1>(to_delete);
if (!name.isEmpty() && filename != m_mod_version.fileName) {
mods->uninstallMod(filename, true);
}
}