From 30d57a57458eabdfa2c851d30fcad0f83cd0fa44 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 24 Nov 2019 12:35:12 +0800 Subject: [PATCH] Update --- .../main/java/forge/download/GuiDownloadPicturesLQ.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/forge-gui/src/main/java/forge/download/GuiDownloadPicturesLQ.java b/forge-gui/src/main/java/forge/download/GuiDownloadPicturesLQ.java index d7e5b8bc54d..f452e86dc8f 100644 --- a/forge-gui/src/main/java/forge/download/GuiDownloadPicturesLQ.java +++ b/forge-gui/src/main/java/forge/download/GuiDownloadPicturesLQ.java @@ -64,13 +64,19 @@ public class GuiDownloadPicturesLQ extends GuiDownloadService { final String imageKey = ImageUtil.getImageKey(c, backFace, false); final String destPath = ForgeConstants.CACHE_CARD_PICS_DIR + imageKey + ".jpg"; final String setcode2 = StaticData.instance().getEditions().getCode2ByCode(c.getEdition()); - final String fullborderPath = ForgeConstants.CACHE_CARD_PICS_DIR + setcode2 + "\\" + TextUtil.fastReplace(imageKey,".full",".fullborder") + ".jpg"; + String modifier = !imageKey.contains(".full") ? ".fullborder" : ""; + final String fullborderPath = ForgeConstants.CACHE_CARD_PICS_DIR + setcode2 + "\\" + TextUtil.fastReplace(imageKey,".full",".fullborder") + modifier + ".jpg"; final File existingFB = new File (fullborderPath); + final File existingFB2 = new File (TextUtil.fastReplace(fullborderPath, "1.fullborder", ".fullborder")); if (existingFB.exists()) { return; //don't download equivalent full image with an existing fullborder image } + if (existingFB2.exists()) { + return; //check 2 + } + if (existingImages.contains(imageKey + ".jpg")) { return; }