mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Use ImageKey's logic for generating the set subdirectory which also fixes a subtle problem with different card arts.
This commit is contained in:
@@ -38,12 +38,11 @@ public class ImageFetcher {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final boolean backFace = imageKey.endsWith(ImageKeys.BACKFACE_POSTFIX);
|
final boolean backFace = imageKey.endsWith(ImageKeys.BACKFACE_POSTFIX);
|
||||||
final String filename = ImageUtil.getImageKey(paperCard, backFace, false);
|
final String filename = ImageUtil.getImageKey(paperCard, backFace, true);
|
||||||
final StaticData data = StaticData.instance();
|
destFile = new File(ForgeConstants.CACHE_CARD_PICS_DIR + "/" + filename + ".jpg");
|
||||||
final String editionCode2 = data.getEditions().getCode2ByCode(paperCard.getEdition());
|
|
||||||
destFile = new File(ForgeConstants.CACHE_CARD_PICS_DIR + "/" + editionCode2 + "/" + filename + ".jpg");
|
|
||||||
|
|
||||||
// First, try to fetch from magiccards.info, if we have the collector's number to generate a URL.
|
// First, try to fetch from magiccards.info, if we have the collector's number to generate a URL.
|
||||||
|
final StaticData data = StaticData.instance();
|
||||||
final int cardNum = data.getCommonCards().getCardCollectorNumber(paperCard.getName(), paperCard.getEdition());
|
final int cardNum = data.getCommonCards().getCardCollectorNumber(paperCard.getName(), paperCard.getEdition());
|
||||||
if (cardNum != -1) {
|
if (cardNum != -1) {
|
||||||
String suffix = "";
|
String suffix = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user