1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00
This commit is contained in:
nordsoft 2023-09-02 14:15:24 +04:00
parent 348b6b0f32
commit 32ad463170
2 changed files with 3 additions and 3 deletions

View File

@ -248,8 +248,8 @@ QString CModListView::genModInfoText(CModEntry & mod)
result += replaceIfNotEmpty(mod.getValue("installedVersion"), lineTemplate.arg(tr("Installed version")));
result += replaceIfNotEmpty(mod.getValue("latestVersion"), lineTemplate.arg(tr("Latest version")));
if(mod.getValue("localSize").isValid())
result += replaceIfNotEmpty(CModEntry::sizeToString(mod.getValue("localSize").toDouble()), lineTemplate.arg(tr("Size")));
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")));

View File

@ -99,7 +99,7 @@ void CModManager::loadMods()
boost::filesystem::path name = *CResourceHandler::get()->getResourceName(resID);
auto mod = JsonUtils::JsonFromFile(pathToQString(name));
auto json = JsonUtils::toJson(mod);
json["localSize"].Float() = total;
json["localSizeBytes"].Float() = total;
if(!name.is_absolute())
json["storedLocaly"].Bool() = true;