update imagefetcher

This commit is contained in:
Anthony Calosa
2023-04-09 07:55:57 +08:00
parent 2edb504444
commit 04e638b789
3 changed files with 15 additions and 0 deletions

View File

@@ -30,6 +30,8 @@ public class SwingImageFetcher extends ImageFetcher {
private void doFetch(String urlToDownload) throws IOException {
String newdespath = urlToDownload.contains(".fullborder.jpg") ?
TextUtil.fastReplace(destPath, ".full.jpg", ".fullborder.jpg") : destPath;
if (!newdespath.contains(".full") && urlToDownload.startsWith(ForgeConstants.URL_PIC_SCRYFALL_DOWNLOAD))
newdespath = newdespath.replace(".jpg", ".fullborder.jpg"); //fix planes/phenomenon for round border options
URL url = new URL(urlToDownload);
System.out.println("Attempting to fetch: " + url);
BufferedImage image = ImageIO.read(url);