From bb85f9ecd521b078aa7e50d8c68d90808ebf8d8b Mon Sep 17 00:00:00 2001 From: tool4EvEr Date: Thu, 24 Dec 2020 10:27:17 +0100 Subject: [PATCH] Check for setless fullborder while calculating downloads --- .../forge/download/GuiDownloadPicturesLQ.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/forge-gui/src/main/java/forge/download/GuiDownloadPicturesLQ.java b/forge-gui/src/main/java/forge/download/GuiDownloadPicturesLQ.java index 5420b512615..dce1b41bf4a 100644 --- a/forge-gui/src/main/java/forge/download/GuiDownloadPicturesLQ.java +++ b/forge-gui/src/main/java/forge/download/GuiDownloadPicturesLQ.java @@ -23,6 +23,7 @@ import forge.model.FModel; import forge.properties.ForgeConstants; import forge.util.ImageUtil; import forge.util.TextUtil; +import forge.ImageKeys; import java.io.File; import java.util.*; @@ -63,21 +64,8 @@ public class GuiDownloadPicturesLQ extends GuiDownloadService { private void addDLObject(final PaperCard c, final boolean backFace) { 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()); - String modifier = !imageKey.contains(".full") ? ".fullborder" : ""; - final String fullborderPath = ForgeConstants.CACHE_CARD_PICS_DIR + setcode2 + ForgeConstants.PATH_SEPARATOR + 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")) { + if (ImageKeys.getImageFile(imageKey) != null) { return; }