From 879a3d6c71cdd56578b92ff99676d2788d06ce86 Mon Sep 17 00:00:00 2001 From: Rafael Damasceno Date: Mon, 27 May 2019 00:19:15 +0100 Subject: [PATCH 01/12] Implement double faced cards URL from Scryfall --- .../card/dl/sources/ScryfallImageSource.java | 58 ++++++++++++------- 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java index 133bebf5b0..f6c3950d4f 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java @@ -1,8 +1,17 @@ package org.mage.plugins.card.dl.sources; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; import mage.client.util.CardLanguage; import org.mage.plugins.card.images.CardDownloadData; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URL; +import java.net.URLConnection; import java.util.ArrayList; import java.util.HashMap; import java.util.Locale; @@ -62,29 +71,16 @@ public enum ScryfallImageSource implements CardImageSource { alternativeUrl = null; } - // special card number like "103a" and "U123" already compatible - if (baseUrl == null && card.isCollectorIdWithStr()) { - // WARNING, after 2018 it's not compatible and some new sets have GUID files instead card numbers - // TODO: replace card number links to API calls (need test with lands, alternative images and double faces), replace not working images by direct links - - if (card.getCollectorId().startsWith("U") || card.getCollectorIdAsInt() == -1) { - // fix for Ultimate Box Topper (PUMA) and Mythic Edition (MED) -- need to use API - // ignored and go to API call at the end - } else { - baseUrl = "https://img.scryfall.com/cards/large/" + localizedCode + "/" + formatSetName(card.getSet(), isToken) + "/" - + card.getCollectorId() + ".jpg"; - alternativeUrl = "https://img.scryfall.com/cards/large/" + defaultCode + "/" + formatSetName(card.getSet(), isToken) + "/" - + card.getCollectorId() + ".jpg"; - } - } - - // double faced cards do not supports by API (need direct link for img) - // example: https://img.scryfall.com/cards/large/en/xln/173b.jpg + // double faced cards + // Scryfall doesn't support string collector ID's anymore (like "U123" or "176a") + // as such, we need to get the image URL's manually from their API if (baseUrl == null && card.isTwoFacedCard()) { - baseUrl = "https://img.scryfall.com/cards/large/" + localizedCode + "/" + formatSetName(card.getSet(), isToken) + "/" - + card.getCollectorId() + (card.isSecondSide() ? "b" : "a") + ".jpg"; - alternativeUrl = "https://img.scryfall.com/cards/large/" + defaultCode + "/" + formatSetName(card.getSet(), isToken) + "/" - + card.getCollectorId() + (card.isSecondSide() ? "b" : "a") + ".jpg"; + try { + baseUrl = getFaceImageUrl(card, isToken, localizedCode); + alternativeUrl = getFaceImageUrl(card, isToken, defaultCode); + } catch (IOException e) { + e.printStackTrace(); + } } // basic cards by api call (redirect to img link) @@ -99,6 +95,24 @@ public enum ScryfallImageSource implements CardImageSource { return new CardImageUrls(baseUrl, alternativeUrl); } + private String getFaceImageUrl(CardDownloadData card, boolean isToken, String localizationCode) throws IOException { + // connect to Scryfall API + URL cardUrl = new URL("https://api.scryfall.com/cards/" + formatSetName(card.getSet(), isToken) + "/" + + card.getCollectorIdAsInt() + "/" + localizationCode); + URLConnection request = cardUrl.openConnection(); + request.connect(); + + // parse the response and return the image URI from the correct card face + JsonParser jp = new JsonParser(); + JsonElement root = jp.parse(new InputStreamReader((InputStream) request.getContent())); + JsonObject jsonCard = root.getAsJsonObject(); + JsonArray jsonCardFaces = jsonCard.getAsJsonArray("card_faces"); + JsonObject jsonCardFace = jsonCardFaces.get(card.isSecondSide() ? 1 : 0).getAsJsonObject(); + JsonObject jsonImageUris = jsonCardFace.getAsJsonObject("image_uris"); + + return jsonImageUris.get("png").getAsString(); + } + @Override public CardImageUrls generateCardUrl(CardDownloadData card) throws Exception { return innerGenerateURL(card, false); From 2637a29a532a9bfcee4e3e4ce78f8af806d6e229 Mon Sep 17 00:00:00 2001 From: Rafael Damasceno Date: Mon, 27 May 2019 21:35:31 +0100 Subject: [PATCH 02/12] Refactor URL fetching, exclude front face --- .../card/dl/sources/ScryfallImageSource.java | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java index 82468d5c4b..e6cdeda9fa 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java @@ -12,13 +12,9 @@ import org.mage.plugins.card.images.CardDownloadData; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.net.Proxy; import java.net.URL; import java.net.URLConnection; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; -import java.net.Proxy; import java.util.*; /** @@ -83,16 +79,14 @@ public enum ScryfallImageSource implements CardImageSource { alternativeUrl = null; } - // double faced cards - // Scryfall doesn't support string collector ID's anymore (like "U123" or "176a") - // as such, we need to get the image URL's manually from their API - if (baseUrl == null && card.isTwoFacedCard()) { - try { - baseUrl = getFaceImageUrl(card, isToken, localizedCode); - alternativeUrl = getFaceImageUrl(card, isToken, defaultCode); - } catch (IOException e) { - e.printStackTrace(); - } + // double faced card + // the front face can be downloaded normally + // the back face is prepared beforehand + if(baseUrl == null && card.isTwoFacedCard() && !card.isSecondSide()) { + baseUrl = "https://api.scryfall.com/cards/" + formatSetName(card.getSet(), isToken) + "/" + + card.getCollectorIdAsInt() + "/" + localizedCode + "?format=image"; + alternativeUrl = "https://api.scryfall.com/cards/" + formatSetName(card.getSet(), isToken) + "/" + + card.getCollectorIdAsInt() + "/" + defaultCode + "?format=image"; } // basic cards by api call (redirect to img link) @@ -122,7 +116,7 @@ public enum ScryfallImageSource implements CardImageSource { JsonObject jsonCardFace = jsonCardFaces.get(card.isSecondSide() ? 1 : 0).getAsJsonObject(); JsonObject jsonImageUris = jsonCardFace.getAsJsonObject("image_uris"); - return jsonImageUris.get("png").getAsString(); + return jsonImageUris.get("large").getAsString(); } @Override @@ -137,9 +131,21 @@ public enum ScryfallImageSource implements CardImageSource { return false; } - // TODO: download faces info here - if (card.isTwoFacedCard()) { + // prepare the back face URL + if (card.isTwoFacedCard() && card.isSecondSide()) { + String defaultCode = CardLanguage.ENGLISH.getCode(); + final String localizedCode = languageAliases.getOrDefault(this.getCurrentLanguage(), defaultCode); + String url = null; + + try { + url = getFaceImageUrl(card, card.isToken(), localizedCode); + } catch (IOException e) { + logger.warn("Failed to prepare image URL for " + card.getName() + " (" + card.getSet() + ") #" + card.getCollectorId()); + downloadServiceInfo.incErrorCount(); + continue; + } + preparedUrls.put(card, url); } From d579b4b016ec249af57f2784e3abe5f1a5c11c6b Mon Sep 17 00:00:00 2001 From: Rafael Damasceno Date: Mon, 27 May 2019 23:33:13 +0100 Subject: [PATCH 03/12] Better test if Card object from Scryfall has faces --- .../card/dl/sources/ScryfallImageSource.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java index e6cdeda9fa..915c4b89f2 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java @@ -9,7 +9,6 @@ import org.apache.log4j.Logger; import org.mage.plugins.card.dl.DownloadServiceInfo; import org.mage.plugins.card.images.CardDownloadData; -import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.Proxy; @@ -101,10 +100,10 @@ public enum ScryfallImageSource implements CardImageSource { return new CardImageUrls(baseUrl, alternativeUrl); } - private String getFaceImageUrl(CardDownloadData card, boolean isToken, String localizationCode) throws IOException { + private String getFaceImageUrl(CardDownloadData card, boolean isToken, String localizationCode) throws Exception { // connect to Scryfall API - URL cardUrl = new URL("https://api.scryfall.com/cards/" + formatSetName(card.getSet(), isToken) + "/" - + card.getCollectorIdAsInt() + "/" + localizationCode); + final URL cardUrl = new URL("https://api.scryfall.com/cards/" + formatSetName(card.getSet(), isToken) + "/" + + (card.getCollectorIdAsInt() % 1000) + "/" + localizationCode); URLConnection request = cardUrl.openConnection(); request.connect(); @@ -112,6 +111,9 @@ public enum ScryfallImageSource implements CardImageSource { JsonParser jp = new JsonParser(); JsonElement root = jp.parse(new InputStreamReader((InputStream) request.getContent())); JsonObject jsonCard = root.getAsJsonObject(); + if (!jsonCard.has("card_faces")) { + throw new IllegalArgumentException("Couldn't find card_faces in Card JSON."); + } JsonArray jsonCardFaces = jsonCard.getAsJsonArray("card_faces"); JsonObject jsonCardFace = jsonCardFaces.get(card.isSecondSide() ? 1 : 0).getAsJsonObject(); JsonObject jsonImageUris = jsonCardFace.getAsJsonObject("image_uris"); @@ -133,14 +135,14 @@ public enum ScryfallImageSource implements CardImageSource { // prepare the back face URL if (card.isTwoFacedCard() && card.isSecondSide()) { - String defaultCode = CardLanguage.ENGLISH.getCode(); + final String defaultCode = CardLanguage.ENGLISH.getCode(); final String localizedCode = languageAliases.getOrDefault(this.getCurrentLanguage(), defaultCode); String url = null; try { url = getFaceImageUrl(card, card.isToken(), localizedCode); - } catch (IOException e) { + } catch (Exception e) { logger.warn("Failed to prepare image URL for " + card.getName() + " (" + card.getSet() + ") #" + card.getCollectorId()); downloadServiceInfo.incErrorCount(); continue; From 40586096c1e8ef3717b701ea3223189c9ca201d4 Mon Sep 17 00:00:00 2001 From: Rafael Damasceno Date: Tue, 28 May 2019 14:59:31 +0100 Subject: [PATCH 04/12] Remove GPX card and RNA lands direct links --- .../card/dl/sources/ScryfallImageSupportCards.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java index 18c1d88bc5..ea7be33764 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java @@ -355,16 +355,6 @@ public class ScryfallImageSupportCards { put("GRC/Curse of Thirst", "https://img.scryfall.com/cards/large/en/pwp12/81.jpg"); put("GRC/Gather the Townsfolk", "https://img.scryfall.com/cards/large/en/pwp12/79.jpg"); put("GRC/Nearheath Stalker", "https://img.scryfall.com/cards/large/en/pwp12/82.jpg"); - - // TODO: remove Grand Prix fix after scryfall fix image's link (that's link must be work: https://img.scryfall.com/cards/large/en/pgpx/2016b.jpg ) - put("GPX/Sword of Feast and Famine", "https://img.scryfall.com/cards/large/en/pgpx/1%E2%98%85.jpg"); - - // TODO: remove after scryfall add lands to RNA (that's link must works: https://api.scryfall.com/cards/rna/262/en?format=image) - put("RNA/Plains", "https://api.scryfall.com/cards/grn/260/en?format=image"); - put("RNA/Island", "https://api.scryfall.com/cards/grn/261/en?format=image"); - put("RNA/Swamp", "https://api.scryfall.com/cards/grn/262/en?format=image"); - put("RNA/Mountain", "https://api.scryfall.com/cards/grn/263/en?format=image"); - put("RNA/Forest", "https://api.scryfall.com/cards/grn/264/en?format=image"); } }; From 580975143ca0faabe0661fee099b27d92576c495 Mon Sep 17 00:00:00 2001 From: Rafael Damasceno Date: Tue, 28 May 2019 15:01:06 +0100 Subject: [PATCH 05/12] Add art variation cards --- .../card/dl/sources/ScryfallImageSource.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java index 915c4b89f2..cafdc87e9f 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java @@ -78,6 +78,29 @@ public enum ScryfallImageSource implements CardImageSource { alternativeUrl = null; } + // art variation cards + // ARN and POR use † notation + // PLS uses ★ notation + // BFZ and OGW use a notation + if (baseUrl == null && card.getUsesVariousArt() && card.getSet().matches("ARN|POR|PLS|BFZ|OGW")) { + String scryfallCollectorId = card.getCollectorIdAsInt().toString(); + + if (card.getCollectorId().endsWith("b")) { + if (card.getSet().matches("ARN|POR")) { + scryfallCollectorId += "†"; + } else if (card.getSet().matches("PLS")) { + scryfallCollectorId += "★"; + } else if (card.getSet().matches("BFZ|OGW")) { + scryfallCollectorId += "a"; + } + } + + baseUrl = "https://api.scryfall.com/cards/" + formatSetName(card.getSet(), isToken) + "/" + + scryfallCollectorId + "/" + localizedCode + "?format=image"; + alternativeUrl = "https://api.scryfall.com/cards/" + formatSetName(card.getSet(), isToken) + "/" + + scryfallCollectorId + "/" + defaultCode + "?format=image"; + } + // double faced card // the front face can be downloaded normally // the back face is prepared beforehand From 97938859ad33bfa5ba6b2ba9dbf6a912f0a59099 Mon Sep 17 00:00:00 2001 From: Rafael Damasceno Date: Tue, 28 May 2019 15:03:06 +0100 Subject: [PATCH 06/12] Fix 6ED, E001. Connect to API using proxy --- .../card/dl/sources/ScryfallImageSource.java | 71 ++++++++++++++++--- 1 file changed, 61 insertions(+), 10 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java index cafdc87e9f..5871cd60da 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java @@ -4,6 +4,8 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; +import mage.cards.ExpansionSet; +import mage.cards.Sets; import mage.client.util.CardLanguage; import org.apache.log4j.Logger; import org.mage.plugins.card.dl.DownloadServiceInfo; @@ -14,6 +16,7 @@ import java.io.InputStreamReader; import java.net.Proxy; import java.net.URL; import java.net.URLConnection; +import java.net.URLEncoder; import java.util.*; /** @@ -104,7 +107,7 @@ public enum ScryfallImageSource implements CardImageSource { // double faced card // the front face can be downloaded normally // the back face is prepared beforehand - if(baseUrl == null && card.isTwoFacedCard() && !card.isSecondSide()) { + if (baseUrl == null && card.isTwoFacedCard() && !card.isSecondSide()) { baseUrl = "https://api.scryfall.com/cards/" + formatSetName(card.getSet(), isToken) + "/" + card.getCollectorIdAsInt() + "/" + localizedCode + "?format=image"; alternativeUrl = "https://api.scryfall.com/cards/" + formatSetName(card.getSet(), isToken) + "/" @@ -123,11 +126,11 @@ public enum ScryfallImageSource implements CardImageSource { return new CardImageUrls(baseUrl, alternativeUrl); } - private String getFaceImageUrl(CardDownloadData card, boolean isToken, String localizationCode) throws Exception { + private String getFaceImageUrl(Proxy proxy, CardDownloadData card, boolean isToken, String localizationCode) throws Exception { // connect to Scryfall API final URL cardUrl = new URL("https://api.scryfall.com/cards/" + formatSetName(card.getSet(), isToken) + "/" + (card.getCollectorIdAsInt() % 1000) + "/" + localizationCode); - URLConnection request = cardUrl.openConnection(); + URLConnection request = proxy == null ? cardUrl.openConnection() : cardUrl.openConnection(proxy); request.connect(); // parse the response and return the image URI from the correct card face @@ -135,7 +138,7 @@ public enum ScryfallImageSource implements CardImageSource { JsonElement root = jp.parse(new InputStreamReader((InputStream) request.getContent())); JsonObject jsonCard = root.getAsJsonObject(); if (!jsonCard.has("card_faces")) { - throw new IllegalArgumentException("Couldn't find card_faces in Card JSON."); + throw new Exception("Couldn't find card_faces in Card JSON."); } JsonArray jsonCardFaces = jsonCard.getAsJsonArray("card_faces"); JsonObject jsonCardFace = jsonCardFaces.get(card.isSecondSide() ? 1 : 0).getAsJsonObject(); @@ -150,6 +153,9 @@ public enum ScryfallImageSource implements CardImageSource { Proxy proxy = downloadServiceInfo.getProxy(); preparedUrls.clear(); + + final List sixthEditionCards = Sets.findSet("6ED").getSetCardInfo(); + for (CardDownloadData card : downloadList) { // need cancel if (downloadServiceInfo.isNeedCancel()) { @@ -164,7 +170,39 @@ public enum ScryfallImageSource implements CardImageSource { String url = null; try { - url = getFaceImageUrl(card, card.isToken(), localizedCode); + url = getFaceImageUrl(proxy, card, card.isToken(), localizedCode); + } catch (Exception e) { + logger.warn("Failed to prepare image URL for " + card.getName() + " (" + card.getSet() + ") #" + card.getCollectorId()); + downloadServiceInfo.incErrorCount(); + continue; + } + + preparedUrls.put(card, url); + } + + // if a S00 card is in 6ED, it's actually a 6ED card + if (card.getSet().equals("S00") && sixthEditionCards.stream().anyMatch(sixthEditionCard -> sixthEditionCard.getName().equals(card.getName()))) { + String url = null; + + try { + url = searchCard(proxy, "6ED", card.getName()); + + } catch (Exception e) { + logger.warn("Failed to prepare image URL for " + card.getName() + " (" + card.getSet() + ") #" + card.getCollectorId()); + downloadServiceInfo.incErrorCount(); + continue; + } + + preparedUrls.put(card, url); + } + + // if an E01 card number is above 106, it's actually an AKH card + if (card.getSet().equals("E01") && card.getCollectorIdAsInt() > 106) { + String url = null; + + try { + url = searchCard(proxy, "AKH", card.getName()); + } catch (Exception e) { logger.warn("Failed to prepare image URL for " + card.getName() + " (" + card.getSet() + ") #" + card.getCollectorId()); downloadServiceInfo.incErrorCount(); @@ -181,6 +219,24 @@ public enum ScryfallImageSource implements CardImageSource { return true; } + private String searchCard(Proxy proxy, String set, String name) throws Exception { + final URL searchUrl = new URL("https://api.scryfall.com/cards/search?q=s:" + URLEncoder.encode(set + " " + name, "UTF-8")); + URLConnection request = proxy == null ? searchUrl.openConnection() : searchUrl.openConnection(proxy); + request.connect(); + + // parse the response and return the image URI from the correct card face + JsonParser jp = new JsonParser(); + JsonElement root = jp.parse(new InputStreamReader((InputStream) request.getContent())); + JsonObject searchResult = root.getAsJsonObject(); + if (searchResult.get("total_cards").getAsInt() != 1) { + throw new Exception("Card not found in Scryfall."); + } + JsonObject jsonCard = searchResult.getAsJsonArray("data").get(0).getAsJsonObject(); + JsonObject jsonImageUris = jsonCard.getAsJsonObject("image_uris"); + + return jsonImageUris.get("large").getAsString(); + } + @Override public CardImageUrls generateCardUrl(CardDownloadData card) throws Exception { return innerGenerateURL(card, false); @@ -227,11 +283,6 @@ public enum ScryfallImageSource implements CardImageSource { return true; } - @Override - public void setCurrentLanguage(CardLanguage cardLanguage) { - this.currentLanguage = cardLanguage; - } - @Override public CardLanguage getCurrentLanguage() { return currentLanguage; From 6581df34fbdc6560504da3dcf6caa5eec1398717 Mon Sep 17 00:00:00 2001 From: Rafael Damasceno Date: Tue, 28 May 2019 15:20:29 +0100 Subject: [PATCH 07/12] Update direct links, add Spined Wurm --- .../dl/sources/ScryfallImageSupportCards.java | 145 +++++++++--------- 1 file changed, 74 insertions(+), 71 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java index ea7be33764..e5be058d1a 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java @@ -267,94 +267,97 @@ public class ScryfallImageSupportCards { // Duels of the Planeswalkers Promos -- xmage uses one set (DPAP), but scryfall store it by years // 2009 - https://scryfall.com/sets/pdtp - put("DPAP/Garruk Wildspeaker", "https://img.scryfall.com/cards/large/en/pdtp/1.jpg"); + put("DPAP/Garruk Wildspeaker", "https://api.scryfall.com/cards/pdtp/1/en?format=image"); // 2010 - https://scryfall.com/sets/pdp10 - put("DPAP/Liliana Vess", "https://img.scryfall.com/cards/large/en/pdp10/1.jpg"); - put("DPAP/Nissa Revane", "https://img.scryfall.com/cards/large/en/pdp10/2.jpg"); + put("DPAP/Liliana Vess", "https://api.scryfall.com/cards/pdp10/1/en?format=image"); + put("DPAP/Nissa Revane", "https://api.scryfall.com/cards/pdp10/2/en?format=image"); // 2011 - https://scryfall.com/sets/pdp11 - put("DPAP/Frost Titan", "https://img.scryfall.com/cards/large/en/pdp11/1.jpg"); - put("DPAP/Grave Titan", "https://img.scryfall.com/cards/large/en/pdp11/2.jpg"); - put("DPAP/Inferno Titan", "https://img.scryfall.com/cards/large/en/pdp11/3.jpg"); + put("DPAP/Frost Titan", "https://api.scryfall.com/cards/pdp11/1/en?format=image"); + put("DPAP/Grave Titan", "https://api.scryfall.com/cards/pdp11/2/en?format=image"); + put("DPAP/Inferno Titan", "https://api.scryfall.com/cards/pdp11/3/en?format=image"); // 2012 - https://scryfall.com/sets/pdp12 - put("DPAP/Primordial Hydra", "https://img.scryfall.com/cards/large/en/pdp12/1.jpg"); - put("DPAP/Serra Avatar", "https://img.scryfall.com/cards/large/en/pdp12/2.jpg"); - put("DPAP/Vampire Nocturnus", "https://img.scryfall.com/cards/large/en/pdp12/3.jpg"); + put("DPAP/Primordial Hydra", "https://api.scryfall.com/cards/pdp12/1/en?format=image"); + put("DPAP/Serra Avatar", "https://api.scryfall.com/cards/pdp12/2/en?format=image"); + put("DPAP/Vampire Nocturnus", "https://api.scryfall.com/cards/pdp12/3/en?format=image"); // 2013 - https://scryfall.com/sets/pdp13 - put("DPAP/Bonescythe Sliver", "https://img.scryfall.com/cards/large/en/pdp13/1.jpg"); - put("DPAP/Ogre Battledriver", "https://img.scryfall.com/cards/large/en/pdp13/2.jpg"); - put("DPAP/Scavenging Ooze", "https://img.scryfall.com/cards/large/en/pdp13/3.jpg"); + put("DPAP/Bonescythe Sliver", "https://api.scryfall.com/cards/pdp13/1/en?format=image"); + put("DPAP/Ogre Battledriver", "https://api.scryfall.com/cards/pdp13/2/en?format=image"); + put("DPAP/Scavenging Ooze", "https://api.scryfall.com/cards/pdp13/3/en?format=image"); // 2014 - https://scryfall.com/sets/pdp14 - put("DPAP/Soul of Ravnica", "https://img.scryfall.com/cards/large/en/pdp14/1.jpg"); - put("DPAP/Soul of Zendikar", "https://img.scryfall.com/cards/large/en/pdp14/2.jpg"); + put("DPAP/Soul of Ravnica", "https://api.scryfall.com/cards/pdp14/1/en?format=image"); + put("DPAP/Soul of Zendikar", "https://api.scryfall.com/cards/pdp14/2/en?format=image"); // Gateway Promos -- xmage uses one set (GRC), but scryfall store it by years // 2006 - https://scryfall.com/sets/pgtw - put("GRC/Fiery Temper", "https://img.scryfall.com/cards/large/en/pgtw/3.jpg"); - put("GRC/Icatian Javelineers", "https://img.scryfall.com/cards/large/en/pgtw/2.jpg"); - put("GRC/Wood Elves", "https://img.scryfall.com/cards/large/en/pgtw/1.jpg"); + put("GRC/Fiery Temper", "https://api.scryfall.com/cards/pgtw/3/en?format=image"); + put("GRC/Icatian Javelineers", "https://api.scryfall.com/cards/pgtw/2/en?format=image"); + put("GRC/Wood Elves", "https://api.scryfall.com/cards/pgtw/1/en?format=image"); // 2007 - https://scryfall.com/sets/pg07 - put("GRC/Boomerang", "https://img.scryfall.com/cards/large/en/pg07/4.jpg"); - put("GRC/Calciderm", "https://img.scryfall.com/cards/large/en/pg07/5.jpg"); - put("GRC/Dauntless Dourbark", "https://img.scryfall.com/cards/large/en/pg07/12.jpg"); - put("GRC/Llanowar Elves", "https://img.scryfall.com/cards/large/en/pg07/9.jpg"); - put("GRC/Mind Stone", "https://img.scryfall.com/cards/large/en/pg07/11.jpg"); - put("GRC/Mogg Fanatic", "https://img.scryfall.com/cards/large/en/pg07/10.jpg"); - put("GRC/Reckless Wurm", "https://img.scryfall.com/cards/large/en/pg07/6.jpg"); - put("GRC/Yixlid Jailer", "https://img.scryfall.com/cards/large/en/pg07/7.jpg"); - put("GRC/Zoetic Cavern", "https://img.scryfall.com/cards/large/en/pg07/8.jpg"); + put("GRC/Boomerang", "https://api.scryfall.com/cards/pg07/4/en?format=image"); + put("GRC/Calciderm", "https://api.scryfall.com/cards/pg07/5/en?format=image"); + put("GRC/Dauntless Dourbark", "https://api.scryfall.com/cards/pg07/12/en?format=image"); + put("GRC/Llanowar Elves", "https://api.scryfall.com/cards/pg07/9/en?format=image"); + put("GRC/Mind Stone", "https://api.scryfall.com/cards/pg07/11/en?format=image"); + put("GRC/Mogg Fanatic", "https://api.scryfall.com/cards/pg07/10/en?format=image"); + put("GRC/Reckless Wurm", "https://api.scryfall.com/cards/pg07/6/en?format=image"); + put("GRC/Yixlid Jailer", "https://api.scryfall.com/cards/pg07/7/en?format=image"); + put("GRC/Zoetic Cavern", "https://api.scryfall.com/cards/pg07/8/en?format=image"); // 2008a - https://scryfall.com/sets/pg08 - put("GRC/Boggart Ram-Gang", "https://img.scryfall.com/cards/large/en/pg08/17.jpg"); - put("GRC/Cenn's Tactician", "https://img.scryfall.com/cards/large/en/pg08/14.jpg"); - put("GRC/Duergar Hedge-Mage", "https://img.scryfall.com/cards/large/en/pg08/19.jpg"); - put("GRC/Gravedigger", "https://img.scryfall.com/cards/large/en/pg08/16.jpg"); - put("GRC/Lava Axe", "https://img.scryfall.com/cards/large/en/pg08/13.jpg"); - put("GRC/Oona's Blackguard", "https://img.scryfall.com/cards/large/en/pg08/15.jpg"); - put("GRC/Selkie Hedge-Mage", "https://img.scryfall.com/cards/large/en/pg08/20.jpg"); - put("GRC/Wilt-Leaf Cavaliers", "https://img.scryfall.com/cards/large/en/pg08/18.jpg"); + put("GRC/Boggart Ram-Gang", "https://api.scryfall.com/cards/pg08/17/en?format=image"); + put("GRC/Cenn's Tactician", "https://api.scryfall.com/cards/pg08/14/en?format=image"); + put("GRC/Duergar Hedge-Mage", "https://api.scryfall.com/cards/pg08/19/en?format=image"); + put("GRC/Gravedigger", "https://api.scryfall.com/cards/pg08/16/en?format=image"); + put("GRC/Lava Axe", "https://api.scryfall.com/cards/pg08/13/en?format=image"); + put("GRC/Oona's Blackguard", "https://api.scryfall.com/cards/pg08/15/en?format=image"); + put("GRC/Selkie Hedge-Mage", "https://api.scryfall.com/cards/pg08/20/en?format=image"); + put("GRC/Wilt-Leaf Cavaliers", "https://api.scryfall.com/cards/pg08/18/en?format=image"); // Wizards Play Network Promos -- xmage uses one set (GRC), but scryfall store it by years // 2008b - https://scryfall.com/sets/pwpn - put("GRC/Sprouting Thrinax", "https://img.scryfall.com/cards/large/en/pwpn/21.jpg"); - put("GRC/Woolly Thoctar", "https://img.scryfall.com/cards/large/en/pwpn/22.jpg"); + put("GRC/Sprouting Thrinax", "https://api.scryfall.com/cards/pwpn/21/en?format=image"); + put("GRC/Woolly Thoctar", "https://api.scryfall.com/cards/pwpn/22/en?format=image"); // 2009 - https://scryfall.com/sets/pwp09 - put("GRC/Hellspark Elemental", "https://img.scryfall.com/cards/large/en/pwp09/25.jpg"); - put("GRC/Kor Duelist", "https://img.scryfall.com/cards/large/en/pwp09/32.jpg"); - put("GRC/Marisi's Twinclaws", "https://img.scryfall.com/cards/large/en/pwp09/26.jpg"); - put("GRC/Mind Control", "https://img.scryfall.com/cards/large/en/pwp09/30.jpg"); - put("GRC/Path to Exile", "https://img.scryfall.com/cards/large/en/pwp09/24.jpg"); - put("GRC/Rise from the Grave", "https://img.scryfall.com/cards/large/en/pwp09/31.jpg"); - put("GRC/Slave of Bolas", "https://img.scryfall.com/cards/large/en/pwp09/27.jpg"); - put("GRC/Vampire Nighthawk", "https://img.scryfall.com/cards/large/en/pwp09/33.jpg"); + put("GRC/Hellspark Elemental", "https://api.scryfall.com/cards/pwp09/25/en?format=image"); + put("GRC/Kor Duelist", "https://api.scryfall.com/cards/pwp09/32/en?format=image"); + put("GRC/Marisi's Twinclaws", "https://api.scryfall.com/cards/pwp09/26/en?format=image"); + put("GRC/Mind Control", "https://api.scryfall.com/cards/pwp09/30/en?format=image"); + put("GRC/Path to Exile", "https://api.scryfall.com/cards/pwp09/24/en?format=image"); + put("GRC/Rise from the Grave", "https://api.scryfall.com/cards/pwp09/31/en?format=image"); + put("GRC/Slave of Bolas", "https://api.scryfall.com/cards/pwp09/27/en?format=image"); + put("GRC/Vampire Nighthawk", "https://api.scryfall.com/cards/pwp09/33/en?format=image"); // 2010 - https://scryfall.com/sets/pwp10 - put("GRC/Kor Firewalker", "https://img.scryfall.com/cards/large/en/pwp10/36.jpg"); - put("GRC/Leatherback Baloth", "https://img.scryfall.com/cards/large/en/pwp10/37.jpg"); - put("GRC/Syphon Mind", "https://img.scryfall.com/cards/large/en/pwp10/40.jpg"); - put("GRC/Pathrazer of Ulamog", "https://img.scryfall.com/cards/large/en/pwp10/46.jpg"); - put("GRC/Curse of Wizardry", "https://img.scryfall.com/cards/large/en/pwp10/47.jpg"); - put("GRC/Fling/50", "https://img.scryfall.com/cards/large/en/pwp10/50.jpg"); // same card but different year - put("GRC/Sylvan Ranger/51", "https://img.scryfall.com/cards/large/en/pwp10/51.jpg"); // same card but different year - put("GRC/Plague Stinger", "https://img.scryfall.com/cards/large/en/pwp10/59.jpg"); - put("GRC/Golem's Heart", "https://img.scryfall.com/cards/large/en/pwp10/60.jpg"); - put("GRC/Skinrender", "https://img.scryfall.com/cards/large/en/pwp10/63.jpg"); + put("GRC/Kor Firewalker", "https://api.scryfall.com/cards/pwp10/36/en?format=image"); + put("GRC/Leatherback Baloth", "https://api.scryfall.com/cards/pwp10/37/en?format=image"); + put("GRC/Syphon Mind", "https://api.scryfall.com/cards/pwp10/40/en?format=image"); + put("GRC/Pathrazer of Ulamog", "https://api.scryfall.com/cards/pwp10/46/en?format=image"); + put("GRC/Curse of Wizardry", "https://api.scryfall.com/cards/pwp10/47/en?format=image"); + put("GRC/Fling/50", "https://api.scryfall.com/cards/pwp10/50/en?format=image"); // same card but different year + put("GRC/Sylvan Ranger/51", "https://api.scryfall.com/cards/pwp10/51/en?format=image"); // same card but different year + put("GRC/Plague Stinger", "https://api.scryfall.com/cards/pwp10/59/en?format=image"); + put("GRC/Golem's Heart", "https://api.scryfall.com/cards/pwp10/60/en?format=image"); + put("GRC/Skinrender", "https://api.scryfall.com/cards/pwp10/63/en?format=image"); // 2011 - https://scryfall.com/sets/pwp11 - put("GRC/Auramancer", "https://img.scryfall.com/cards/large/en/pwp11/77.jpg"); - put("GRC/Bloodcrazed Neonate", "https://img.scryfall.com/cards/large/en/pwp11/83.jpg"); - put("GRC/Boneyard Wurm", "https://img.scryfall.com/cards/large/en/pwp11/84.jpg"); - put("GRC/Circle of Flame", "https://img.scryfall.com/cards/large/en/pwp11/78.jpg"); - put("GRC/Curse of the Bloody Tome", "https://img.scryfall.com/cards/large/en/pwp11/80.jpg"); - put("GRC/Fling/69", "https://img.scryfall.com/cards/large/en/pwp11/69.jpg"); // same card but different year - put("GRC/Master's Call", "https://img.scryfall.com/cards/large/en/pwp11/64.jpg"); - put("GRC/Maul Splicer", "https://img.scryfall.com/cards/large/en/pwp11/72.jpg"); - put("GRC/Plague Myr", "https://img.scryfall.com/cards/large/en/pwp11/65.jpg"); - put("GRC/Shrine of Burning Rage", "https://img.scryfall.com/cards/large/en/pwp11/73.jpg"); - put("GRC/Signal Pest", "https://img.scryfall.com/cards/large/en/pwp11/66.jpg"); - put("GRC/Sylvan Ranger/70", "https://img.scryfall.com/cards/large/en/pwp11/70.jpg"); // same card but different year - put("GRC/Tormented Soul", "https://img.scryfall.com/cards/large/en/pwp11/76.jpg"); - put("GRC/Vault Skirge", "https://img.scryfall.com/cards/large/en/pwp11/71.jpg"); + put("GRC/Auramancer", "https://api.scryfall.com/cards/pwp11/77/en?format=image"); + put("GRC/Bloodcrazed Neonate", "https://api.scryfall.com/cards/pwp11/83/en?format=image"); + put("GRC/Boneyard Wurm", "https://api.scryfall.com/cards/pwp11/84/en?format=image"); + put("GRC/Circle of Flame", "https://api.scryfall.com/cards/pwp11/78/en?format=image"); + put("GRC/Curse of the Bloody Tome", "https://api.scryfall.com/cards/pwp11/80/en?format=image"); + put("GRC/Fling/69", "https://api.scryfall.com/cards/pwp11/69/en?format=image"); // same card but different year + put("GRC/Master's Call", "https://api.scryfall.com/cards/pwp11/64/en?format=image"); + put("GRC/Maul Splicer", "https://api.scryfall.com/cards/pwp11/72/en?format=image"); + put("GRC/Plague Myr", "https://api.scryfall.com/cards/pwp11/65/en?format=image"); + put("GRC/Shrine of Burning Rage", "https://api.scryfall.com/cards/pwp11/73/en?format=image"); + put("GRC/Signal Pest", "https://api.scryfall.com/cards/pwp11/66/en?format=image"); + put("GRC/Sylvan Ranger/70", "https://api.scryfall.com/cards/pwp11/70/en?format=image"); // same card but different year + put("GRC/Tormented Soul", "https://api.scryfall.com/cards/pwp11/76/en?format=image"); + put("GRC/Vault Skirge", "https://api.scryfall.com/cards/pwp11/71/en?format=image"); // 2012 - https://scryfall.com/sets/pwp12 - put("GRC/Curse of Thirst", "https://img.scryfall.com/cards/large/en/pwp12/81.jpg"); - put("GRC/Gather the Townsfolk", "https://img.scryfall.com/cards/large/en/pwp12/79.jpg"); - put("GRC/Nearheath Stalker", "https://img.scryfall.com/cards/large/en/pwp12/82.jpg"); + put("GRC/Curse of Thirst", "https://api.scryfall.com/cards/pwp12/81/en?format=image"); + put("GRC/Gather the Townsfolk", "https://api.scryfall.com/cards/pwp12/79/en?format=image"); + put("GRC/Nearheath Stalker", "https://api.scryfall.com/cards/pwp12/82/en?format=image"); + + // Spined Wurm print in Starter 2000 is actually from Magazine Inserts + put("S00/Spined Wurm", "https://api.scryfall.com/cards/pmei/11/en?format=image"); } }; From 325ce708a18dfa536c1f4bbf8e214a118311b068 Mon Sep 17 00:00:00 2001 From: Rafael Damasceno Date: Tue, 28 May 2019 15:22:45 +0100 Subject: [PATCH 08/12] Restore deleted method --- .../mage/plugins/card/dl/sources/ScryfallImageSource.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java index 5871cd60da..57580ab729 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java @@ -283,6 +283,12 @@ public enum ScryfallImageSource implements CardImageSource { return true; } + @Override + public void setCurrentLanguage(CardLanguage cardLanguage) { + this.currentLanguage = cardLanguage; + } + + @Override public CardLanguage getCurrentLanguage() { return currentLanguage; From fe14ddb9e9e725faa83954404b1cae2a34a8b911 Mon Sep 17 00:00:00 2001 From: Rafael Damasceno Date: Tue, 28 May 2019 15:23:19 +0100 Subject: [PATCH 09/12] Delete extra newline --- .../org/mage/plugins/card/dl/sources/ScryfallImageSource.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java index 57580ab729..f7a384ee07 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java @@ -288,7 +288,6 @@ public enum ScryfallImageSource implements CardImageSource { this.currentLanguage = cardLanguage; } - @Override public CardLanguage getCurrentLanguage() { return currentLanguage; From 286391738c18d20b2bc68ed35c09028e73eb40e3 Mon Sep 17 00:00:00 2001 From: Rafael Damasceno Date: Tue, 28 May 2019 15:56:13 +0100 Subject: [PATCH 10/12] Remove BFZ and OGW art variations as they're fixed upstream --- .../mage/plugins/card/dl/sources/ScryfallImageSource.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java index f7a384ee07..3ba728a09b 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java @@ -84,8 +84,7 @@ public enum ScryfallImageSource implements CardImageSource { // art variation cards // ARN and POR use † notation // PLS uses ★ notation - // BFZ and OGW use a notation - if (baseUrl == null && card.getUsesVariousArt() && card.getSet().matches("ARN|POR|PLS|BFZ|OGW")) { + if (baseUrl == null && card.getUsesVariousArt() && card.getSet().matches("ARN|POR|PLS")) { String scryfallCollectorId = card.getCollectorIdAsInt().toString(); if (card.getCollectorId().endsWith("b")) { @@ -93,8 +92,6 @@ public enum ScryfallImageSource implements CardImageSource { scryfallCollectorId += "†"; } else if (card.getSet().matches("PLS")) { scryfallCollectorId += "★"; - } else if (card.getSet().matches("BFZ|OGW")) { - scryfallCollectorId += "a"; } } From dd929ad622b75bf581170953d0424feb261c8933 Mon Sep 17 00:00:00 2001 From: Rafael Damasceno Date: Tue, 28 May 2019 21:30:51 +0100 Subject: [PATCH 11/12] Finish meld fix, add S00 lands --- .../plugins/card/dl/sources/ScryfallImageSource.java | 5 +++++ .../card/dl/sources/ScryfallImageSupportCards.java | 12 ++++++++++++ Mage.Sets/src/mage/sets/FromTheVaultTransform.java | 3 +-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java index 3ba728a09b..2c11120fe4 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java @@ -179,6 +179,11 @@ public enum ScryfallImageSource implements CardImageSource { // if a S00 card is in 6ED, it's actually a 6ED card if (card.getSet().equals("S00") && sixthEditionCards.stream().anyMatch(sixthEditionCard -> sixthEditionCard.getName().equals(card.getName()))) { + // we have direct links for the lands because there are multiple search results + if (card.getUsesVariousArt()) { // lands are the only defined multiple art cards in S00 in XMage + continue; + } + String url = null; try { diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java index e5be058d1a..8b42a7f1bf 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportCards.java @@ -358,6 +358,18 @@ public class ScryfallImageSupportCards { // Spined Wurm print in Starter 2000 is actually from Magazine Inserts put("S00/Spined Wurm", "https://api.scryfall.com/cards/pmei/11/en?format=image"); + // Most of the other S00 cards are from 6ED + // We'll download lands manually because we have multiple arts and XMage has totally different ID's + put("S00/Forest/49", "https://api.scryfall.com/cards/6ed/347/en?format=image"); + put("S00/Forest/50", "https://api.scryfall.com/cards/6ed/348/en?format=image"); + put("S00/Island/51", "https://api.scryfall.com/cards/6ed/335/en?format=image"); + put("S00/Island/52", "https://api.scryfall.com/cards/6ed/336/en?format=image"); + put("S00/Mountain/53", "https://api.scryfall.com/cards/6ed/343/en?format=image"); + put("S00/Mountain/54", "https://api.scryfall.com/cards/6ed/344/en?format=image"); + put("S00/Plains/55", "https://api.scryfall.com/cards/6ed/331/en?format=image"); + put("S00/Plains/56", "https://api.scryfall.com/cards/6ed/332/en?format=image"); + put("S00/Swamp/57", "https://api.scryfall.com/cards/6ed/339/en?format=image"); + put("S00/Swamp/58", "https://api.scryfall.com/cards/6ed/340/en?format=image"); } }; diff --git a/Mage.Sets/src/mage/sets/FromTheVaultTransform.java b/Mage.Sets/src/mage/sets/FromTheVaultTransform.java index 5fa3f6fb08..5fb2ccb42b 100644 --- a/Mage.Sets/src/mage/sets/FromTheVaultTransform.java +++ b/Mage.Sets/src/mage/sets/FromTheVaultTransform.java @@ -30,7 +30,6 @@ public final class FromTheVaultTransform extends ExpansionSet { cards.add(new SetCardInfo("Lord of Lineage", "4b", Rarity.MYTHIC, mage.cards.l.LordOfLineage.class)); cards.add(new SetCardInfo("Bruna, the Fading Light", "5a", Rarity.MYTHIC, mage.cards.b.BrunaTheFadingLight.class)); cards.add(new SetCardInfo("Brisela, Voice of Nightmares", "5b", Rarity.MYTHIC, mage.cards.b.BriselaVoiceOfNightmares.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Brisela, Voice of Nightmares", "5c", Rarity.MYTHIC, mage.cards.b.BriselaVoiceOfNightmares.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Chandra, Fire of Kaladesh", "6a", Rarity.MYTHIC, mage.cards.c.ChandraFireOfKaladesh.class)); cards.add(new SetCardInfo("Chandra, Roaring Flame", "6b", Rarity.MYTHIC, mage.cards.c.ChandraRoaringFlame.class)); cards.add(new SetCardInfo("Delver of Secrets", "7a", Rarity.MYTHIC, mage.cards.d.DelverOfSecrets.class)); @@ -39,7 +38,7 @@ public final class FromTheVaultTransform extends ExpansionSet { cards.add(new SetCardInfo("Withengar Unbound", "8b", Rarity.MYTHIC, mage.cards.w.WithengarUnbound.class)); cards.add(new SetCardInfo("Garruk Relentless", "9a", Rarity.MYTHIC, mage.cards.g.GarrukRelentless.class)); cards.add(new SetCardInfo("Garruk, the Veil-Cursed", "9b", Rarity.MYTHIC, mage.cards.g.GarrukTheVeilCursed.class)); - cards.add(new SetCardInfo("Gisela, the Broken Blade", 10, Rarity.MYTHIC, mage.cards.g.GiselaTheBrokenBlade.class)); + cards.add(new SetCardInfo("Gisela, the Broken Blade", "10a", Rarity.MYTHIC, mage.cards.g.GiselaTheBrokenBlade.class)); cards.add(new SetCardInfo("Huntmaster of the Fells", "11a", Rarity.MYTHIC, mage.cards.h.HuntmasterOfTheFells.class)); cards.add(new SetCardInfo("Ravager of the Fells", "11b", Rarity.MYTHIC, mage.cards.r.RavagerOfTheFells.class)); cards.add(new SetCardInfo("Jace, Vryn's Prodigy", "12a", Rarity.MYTHIC, mage.cards.j.JaceVrynsProdigy.class)); From 628a7d6faa23d07f7d2784219146f4c77c98b967 Mon Sep 17 00:00:00 2001 From: Rafael Damasceno Date: Tue, 28 May 2019 21:33:33 +0100 Subject: [PATCH 12/12] Delete extra newlines --- .../org/mage/plugins/card/dl/sources/ScryfallImageSource.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java index 2c11120fe4..da4235d931 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSource.java @@ -188,7 +188,6 @@ public enum ScryfallImageSource implements CardImageSource { try { url = searchCard(proxy, "6ED", card.getName()); - } catch (Exception e) { logger.warn("Failed to prepare image URL for " + card.getName() + " (" + card.getSet() + ") #" + card.getCollectorId()); downloadServiceInfo.incErrorCount(); @@ -204,7 +203,6 @@ public enum ScryfallImageSource implements CardImageSource { try { url = searchCard(proxy, "AKH", card.getName()); - } catch (Exception e) { logger.warn("Failed to prepare image URL for " + card.getName() + " (" + card.getSet() + ") #" + card.getCollectorId()); downloadServiceInfo.incErrorCount();