mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
Merge branch 'master' into set_extinfo
This commit is contained in:
commit
2704523c73
20 changed files with 440 additions and 54 deletions
|
|
@ -227,16 +227,18 @@ QString PictureLoader::getPicUrl()
|
|||
return picUrl;
|
||||
}
|
||||
|
||||
// otherwise, fallback to the default url
|
||||
picUrl = picDownloadHq ? settingsCache->getPicUrlHq() : settingsCache->getPicUrl();
|
||||
picUrl.replace("!name!", QUrl::toPercentEncoding(card->getCorrectedName()));
|
||||
// if a card has a muid, use the default url; if not, use the fallback
|
||||
int muid = set ? card->getMuId(set->getShortName()) : 0;
|
||||
if(muid)
|
||||
picUrl = picDownloadHq ? settingsCache->getPicUrlHq() : settingsCache->getPicUrl();
|
||||
else
|
||||
picUrl = picDownloadHq ? settingsCache->getPicUrlHqFallback() : settingsCache->getPicUrlFallback();
|
||||
|
||||
picUrl.replace("!name!", QUrl::toPercentEncoding(card->getCorrectedName()));
|
||||
picUrl.replace("!cardid!", QUrl::toPercentEncoding(QString::number(muid)));
|
||||
if (set) {
|
||||
picUrl.replace("!setcode!", QUrl::toPercentEncoding(set->getShortName()));
|
||||
picUrl.replace("!setname!", QUrl::toPercentEncoding(set->getLongName()));
|
||||
int muid = card->getMuId(set->getShortName());
|
||||
if (muid)
|
||||
picUrl.replace("!cardid!", QUrl::toPercentEncoding(QString::number(muid)));
|
||||
}
|
||||
|
||||
if (picUrl.contains("!name!") ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue