1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Merge pull request #1079 from Nordsoft91/fix-screenshots-param

Fix screenshots loading
This commit is contained in:
Andrii Danylchenko
2022-10-22 12:30:15 +03:00
committed by GitHub

View File

@@ -299,11 +299,16 @@ CModEntry CModList::getMod(QString modname) const
{
if(repo.empty() || CModEntry::compareVersions(repo["version"].toString(), repoValMap["version"].toString()))
{
//take valid download link before assignment
//take valid download link and screenshots before assignment
auto download = repo.value("download");
auto screenshots = repo.value("screenshots");
repo = repoValMap;
if(repo.value("download").isNull())
{
repo["download"] = download;
if(repo.value("screenshots").isNull()) //taking screenshot from the downloadable version
repo["screenshots"] = screenshots;
}
}
}
}