|
@@ -249,9 +249,9 @@ QString CModListView::genModInfoText(CModEntry & mod)
|
|
result += replaceIfNotEmpty(mod.getValue("latestVersion"), lineTemplate.arg(tr("Latest version")));
|
|
result += replaceIfNotEmpty(mod.getValue("latestVersion"), lineTemplate.arg(tr("Latest version")));
|
|
|
|
|
|
if(mod.getValue("localSizeBytes").isValid())
|
|
if(mod.getValue("localSizeBytes").isValid())
|
|
- result += replaceIfNotEmpty(CModEntry::sizeToString(mod.getValue("localSizeBytes").toDouble()), lineTemplate.arg(tr("Size")));
|
|
|
|
- if((mod.isAvailable() || mod.isUpdateable()) && mod.getValue("size").isValid())
|
|
|
|
- result += replaceIfNotEmpty(CModEntry::sizeToString(mbToBytes(mod.getValue("size").toDouble())), lineTemplate.arg(tr("Download size")));
|
|
|
|
|
|
+ result += replaceIfNotEmpty(CModEntry::sizeToString(mod.getValue("localSizeBytes").toDouble()), lineTemplate.arg(tr("downloadSize")));
|
|
|
|
+ if((mod.isAvailable() || mod.isUpdateable()) && mod.getValue("downloadSize").isValid())
|
|
|
|
+ result += replaceIfNotEmpty(CModEntry::sizeToString(mbToBytes(mod.getValue("downloadSize").toDouble())), lineTemplate.arg(tr("Download size")));
|
|
|
|
|
|
result += replaceIfNotEmpty(mod.getValue("author"), lineTemplate.arg(tr("Authors")));
|
|
result += replaceIfNotEmpty(mod.getValue("author"), lineTemplate.arg(tr("Authors")));
|
|
|
|
|
|
@@ -543,7 +543,7 @@ void CModListView::on_updateButton_clicked()
|
|
auto mod = modModel->getMod(name);
|
|
auto mod = modModel->getMod(name);
|
|
// update required mod, install missing (can be new dependency)
|
|
// update required mod, install missing (can be new dependency)
|
|
if(mod.isUpdateable() || !mod.isInstalled())
|
|
if(mod.isUpdateable() || !mod.isInstalled())
|
|
- downloadFile(name + ".zip", mod.getValue("download").toString(), "mods", mbToBytes(mod.getValue("size").toDouble()));
|
|
|
|
|
|
+ downloadFile(name + ".zip", mod.getValue("download").toString(), "mods", mbToBytes(mod.getValue("downloadSize").toDouble()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -573,7 +573,7 @@ void CModListView::on_installButton_clicked()
|
|
{
|
|
{
|
|
auto mod = modModel->getMod(name);
|
|
auto mod = modModel->getMod(name);
|
|
if(!mod.isInstalled())
|
|
if(!mod.isInstalled())
|
|
- downloadFile(name + ".zip", mod.getValue("download").toString(), "mods", mbToBytes(mod.getValue("size").toDouble()));
|
|
|
|
|
|
+ downloadFile(name + ".zip", mod.getValue("download").toString(), "mods", mbToBytes(mod.getValue("downloadSize").toDouble()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -863,7 +863,7 @@ void CModListView::doInstallMod(const QString & modName)
|
|
{
|
|
{
|
|
auto mod = modModel->getMod(name);
|
|
auto mod = modModel->getMod(name);
|
|
if(!mod.isInstalled())
|
|
if(!mod.isInstalled())
|
|
- downloadFile(name + ".zip", mod.getValue("download").toString(), "mods", mbToBytes(mod.getValue("size").toDouble()));
|
|
|
|
|
|
+ downloadFile(name + ".zip", mod.getValue("download").toString(), "mods", mbToBytes(mod.getValue("downloadSize").toDouble()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|