1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix screenshots loading

This commit is contained in:
nordsoft 2022-10-21 04:03:54 +04:00
parent c32d44190e
commit 2409bdfbda

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;
}
}
}
}