mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
fix infinite notice for missing tokens
This commit is contained in:
@@ -85,7 +85,7 @@ public final class ImageKeys {
|
||||
}
|
||||
|
||||
private static final Map<String, File> cachedCards = new HashMap<>(50000);
|
||||
private static HashSet<String> missingCards = new HashSet<>();
|
||||
public static HashSet<String> missingCards = new HashSet<>();
|
||||
public static void clearMissingCards() {
|
||||
missingCards.clear();
|
||||
}
|
||||
|
||||
@@ -228,6 +228,11 @@ public abstract class ImageFetcher {
|
||||
}
|
||||
if (filename.equalsIgnoreCase("null.jpg"))
|
||||
return;
|
||||
|
||||
if (ImageKeys.missingCards.contains(filename))
|
||||
return;
|
||||
|
||||
ImageKeys.missingCards.add(filename);
|
||||
System.err.println("No specified file for '" + filename + "'.. Attempting to download from default Url");
|
||||
tokenUrl = String.format("%s%s", ForgeConstants.URL_TOKEN_DOWNLOAD, filename);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user