1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-16 02:47:36 +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
commit 91dc94c66b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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