Commit ffed0e00 authored by Gavin Bisesi's avatar Gavin Bisesi
Browse files

Merge pull request #214 from pliu037/master

Added better support for custom card images
parents ca6bd669 c3a68fcb
......@@ -129,21 +129,22 @@ void PictureLoader::processLoadQueue()
QString setName = ptl.getSetName();
QImage image;
if (!image.load(QString("%1/%2/%3.full.jpg").arg(picsPath).arg(setName).arg(correctedName)))
if (!image.load(QString("%1/%2/%3%4.full.jpg").arg(picsPath).arg(setName).arg(correctedName).arg(1)))
if (!image.load(QString("%1/%2/%3/%4.full.jpg").arg(picsPath).arg("downloadedPics").arg(setName).arg(correctedName))) {
if (picDownload) {
cardsToDownload.append(ptl);
if (!downloadRunning)
startNextPicDownload();
} else {
if (ptl.nextSet())
loadQueue.prepend(ptl);
else
emit imageLoaded(ptl.getCard(), QImage());
if (!image.load(QString("%1/%2/%3.full.jpg").arg(picsPath).arg("CUSTOM").arg(correctedName))) {
if (!image.load(QString("%1/%2/%3.full.jpg").arg(picsPath).arg(setName).arg(correctedName)))
//if (!image.load(QString("%1/%2/%3%4.full.jpg").arg(picsPath).arg(setName).arg(correctedName).arg(1)))
if (!image.load(QString("%1/%2/%3/%4.full.jpg").arg(picsPath).arg("downloadedPics").arg(setName).arg(correctedName))) {
if (picDownload) {
cardsToDownload.append(ptl);
if (!downloadRunning)
startNextPicDownload();
} else {
if (ptl.nextSet())
loadQueue.prepend(ptl);
else
emit imageLoaded(ptl.getCard(), QImage());
}
}
continue;
}
}
emit imageLoaded(ptl.getCard(), image);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment