non-supported cards will have a default image

This commit is contained in:
Maxmtg
2014-02-02 10:56:44 +00:00
parent 6575000c28
commit 12ed04a7cc

View File

@@ -141,11 +141,11 @@ public class ImageCache {
boolean altState = imageKey.endsWith(ImageKeys.BACKFACE_POSTFIX); boolean altState = imageKey.endsWith(ImageKeys.BACKFACE_POSTFIX);
if(altState) if(altState)
imageKey = imageKey.substring(0, imageKey.length() - ImageKeys.BACKFACE_POSTFIX.length()); imageKey = imageKey.substring(0, imageKey.length() - ImageKeys.BACKFACE_POSTFIX.length());
if (imageKey.startsWith(ImageKeys.CARD_PREFIX)) if (imageKey.startsWith(ImageKeys.CARD_PREFIX)) {
imageKey = getImageKey(getPaperCardFromImageKey(imageKey.substring(2)), altState, true); imageKey = getImageKey(getPaperCardFromImageKey(imageKey.substring(2)), altState, true);
if (StringUtils.isBlank(imageKey)) {
if (StringUtils.isBlank(imageKey)) { return _defaultImage;
return null; }
} }
// Load from file and add to cache if not found in cache initially. // Load from file and add to cache if not found in cache initially.