mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Prioritize FTP images before scryfall
This commit is contained in:
@@ -63,6 +63,11 @@ public abstract class ImageFetcher {
|
|||||||
final String filename = ImageUtil.getImageKey(paperCard, backFace, true);
|
final String filename = ImageUtil.getImageKey(paperCard, backFace, true);
|
||||||
destFile = new File(ForgeConstants.CACHE_CARD_PICS_DIR + "/" + filename + ".jpg");
|
destFile = new File(ForgeConstants.CACHE_CARD_PICS_DIR + "/" + filename + ".jpg");
|
||||||
|
|
||||||
|
//move priority of ftp image here
|
||||||
|
StringBuilder setDownload = new StringBuilder(ForgeConstants.URL_PIC_DOWNLOAD);
|
||||||
|
setDownload.append(ImageUtil.getDownloadUrl(paperCard, backFace));
|
||||||
|
downloadUrls.add(setDownload.toString());
|
||||||
|
|
||||||
int artIndex = 1;
|
int artIndex = 1;
|
||||||
final Pattern pattern = Pattern.compile("^.:([^|]*\\|){2}(\\d+).*$");
|
final Pattern pattern = Pattern.compile("^.:([^|]*\\|){2}(\\d+).*$");
|
||||||
Matcher matcher = pattern.matcher(imageKey);
|
Matcher matcher = pattern.matcher(imageKey);
|
||||||
@@ -89,10 +94,6 @@ public abstract class ImageFetcher {
|
|||||||
editionMciCode, cardNum, suffix, langCode));
|
editionMciCode, cardNum, suffix, langCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder setDownload = new StringBuilder(ForgeConstants.URL_PIC_DOWNLOAD);
|
|
||||||
setDownload.append(ImageUtil.getDownloadUrl(paperCard, backFace));
|
|
||||||
downloadUrls.add(setDownload.toString());
|
|
||||||
|
|
||||||
} else if (prefix.equals(ImageKeys.TOKEN_PREFIX)) {
|
} else if (prefix.equals(ImageKeys.TOKEN_PREFIX)) {
|
||||||
if (tokenImages == null) {
|
if (tokenImages == null) {
|
||||||
tokenImages = new HashMap<>();
|
tokenImages = new HashMap<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user