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 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() {
|
public static void clearMissingCards() {
|
||||||
missingCards.clear();
|
missingCards.clear();
|
||||||
}
|
}
|
||||||
@@ -310,7 +310,7 @@ public final class ImageKeys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// System.out.println("File not found, no image created: " + key);
|
// System.out.println("File not found, no image created: " + key);
|
||||||
//add missing cards - disable for desktop version for compatibility reasons with autodownloader
|
// add missing cards - disable for desktop version for compatibility reasons with autodownloader
|
||||||
if (isLibGDXPort && !hasSetLookup(filename)) //missing cards with setlookup is handled differently
|
if (isLibGDXPort && !hasSetLookup(filename)) //missing cards with setlookup is handled differently
|
||||||
missingCards.add(filename);
|
missingCards.add(filename);
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -228,6 +228,11 @@ public abstract class ImageFetcher {
|
|||||||
}
|
}
|
||||||
if (filename.equalsIgnoreCase("null.jpg"))
|
if (filename.equalsIgnoreCase("null.jpg"))
|
||||||
return;
|
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");
|
System.err.println("No specified file for '" + filename + "'.. Attempting to download from default Url");
|
||||||
tokenUrl = String.format("%s%s", ForgeConstants.URL_TOKEN_DOWNLOAD, filename);
|
tokenUrl = String.format("%s%s", ForgeConstants.URL_TOKEN_DOWNLOAD, filename);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user