mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
[AER] Some more minor fixes.
This commit is contained in:
parent
d519aa55c1
commit
9353c5aa9c
5 changed files with 299 additions and 301 deletions
|
|
@ -91,6 +91,8 @@ public class MythicspoilerComSource implements CardImageSource {
|
|||
cardNameAliases.put("BFZ-kozliekschanneler", "kozilekschanneler");
|
||||
cardNameAliases.put("OGW-wastes", "wastes1");
|
||||
cardNameAliases.put("OGW-wastes2", "wastes2");
|
||||
cardNameAliases.put("AER-locketofmyths", "lifecraftersbestiary");
|
||||
cardNameAliases.put("AER-aegisautomation", "aegisautomaton");
|
||||
|
||||
cardNameAliasesStart = new HashMap<>();
|
||||
HashSet<String> names = new HashSet<>();
|
||||
|
|
@ -123,8 +125,7 @@ public class MythicspoilerComSource implements CardImageSource {
|
|||
String doubleFacedUrl = baseUrl + "dfc.html";
|
||||
pageLinks = getSetLinksFromPage(cardSet, aliasesStart, prefs, proxyType, baseUrl, doubleFacedUrl);
|
||||
setLinks.putAll(pageLinks);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
} catch (Exception ex) {
|
||||
// that's ok if we cannot download double-faced cards for some sets
|
||||
}
|
||||
}
|
||||
|
|
@ -136,7 +137,7 @@ public class MythicspoilerComSource implements CardImageSource {
|
|||
}
|
||||
|
||||
private Map<String, String> getSetLinksFromPage(String cardSet, Set<String> aliasesStart, Preferences prefs,
|
||||
ProxyType proxyType, String baseUrl, String pageUrl) throws IOException {
|
||||
ProxyType proxyType, String baseUrl, String pageUrl) throws IOException {
|
||||
Map<String, String> pageLinks = new HashMap<>();
|
||||
|
||||
String urlDocument;
|
||||
|
|
@ -181,16 +182,14 @@ public class MythicspoilerComSource implements CardImageSource {
|
|||
if (cardName != null && !cardName.isEmpty()) {
|
||||
if (cardNameAliases.containsKey(cardSet + "-" + cardName)) {
|
||||
cardName = cardNameAliases.get(cardSet + "-" + cardName);
|
||||
} else {
|
||||
if (cardName.endsWith("1") || cardName.endsWith("2") || cardName.endsWith("3") || cardName.endsWith("4") || cardName.endsWith("5")) {
|
||||
if (!cardName.startsWith("forest")
|
||||
&& !cardName.startsWith("swamp")
|
||||
&& !cardName.startsWith("mountain")
|
||||
&& !cardName.startsWith("island")
|
||||
&& !cardName.startsWith("plains")) {
|
||||
} else if (cardName.endsWith("1") || cardName.endsWith("2") || cardName.endsWith("3") || cardName.endsWith("4") || cardName.endsWith("5")) {
|
||||
if (!cardName.startsWith("forest")
|
||||
&& !cardName.startsWith("swamp")
|
||||
&& !cardName.startsWith("mountain")
|
||||
&& !cardName.startsWith("island")
|
||||
&& !cardName.startsWith("plains")) {
|
||||
|
||||
cardName = cardName.substring(0, cardName.length() - 1);
|
||||
}
|
||||
cardName = cardName.substring(0, cardName.length() - 1);
|
||||
}
|
||||
}
|
||||
pageLinks.put(cardName, baseUrl + cardLink);
|
||||
|
|
@ -244,17 +243,17 @@ public class MythicspoilerComSource implements CardImageSource {
|
|||
public String getFileForHttpImage(String httpImageUrl) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer getTotalImages() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean isTokenSource() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void doPause(String httpImageUrl) {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue