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:
commit
91dc94c66b
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user